Monthly Archives: June 2013

Anonymous Python

This is an anonymous python – as seen in Google Docs: That’s it – just a snake in a green box. Shows up in Google Docs when viewing a video or other item:

Posted in Random, Software | Tagged , | Leave a comment

Command To Shutdown And Power Off Raspberry Pi

For the Raspberry Pi: sudo poweroff shuts down and sudo reboot reboots The default username is pi and the default password is raspberry

Posted in Tech Tips | Tagged | Leave a comment

GravityForms: tw-sack.min – Uncaught SyntaxError: Unexpected identifier tw-sack.min.js:1

Here is what the error looks like in the Chrome Debugger Console: Uncaught SyntaxError: Unexpected identifier tw-sack.min.js:1 If you’r getting a problem with editing forms in GravityForms, or perhaps trying to add fields, you can take a look at the source code and you’ll see what happens – an AJAX request is made, but twsack does not like the response which looks something like: EndAddField({“id”: 1, “label”: “Hidden Field”, “adminLabel”: “”, “type”: “hidden “, “isRequired”: false, “size”: “medium”, “errorMessage”: “”, “inputs”: null}, ” <li id=’field_1′ class=’selectable gfield gform_hidden’ ><div class=’gfield_ admin_icons’><div class=’gfield_admin_header_title’>Hidden : Field ID 1</div><a class=’field_delete_icon’ id=’gfield_delete_1′ title=’click to delete this field ‘ rel=’nofollow’ href=’#’ onclick=’StartDeleteField(this); return false;’>Delete</a><a class=’f ield_duplicate_icon’ id=’gfield_duplicate_1′ title=’click to duplicate this fiel d’ rel=’nofollow’ href=’#’ onclick=’StartDuplicateField(this); return false;’>Duplicate</a><a c lass=’field_edit_icon edit_icon_collapsed’ title=’click to edit this field’>Edit </a></div><label class=’gfield_label’ for=’input_1′>Hidden Field</label><input p laceholder=”Hidden Field” name=’input_1′ id=’input_1′ type=’text’ value=” dis abled=’disabled’/></li>”);m So the problem is actually that the response comes back with a Content-type of json, javascript, or html when it should be returned as text/plain – something like: Content-Type: text/html; charset=UTF-8 To test, I edited the file form_detail.php and changed line 2178 (or rather inserted this line) – for gravity forms 1.7.5 (omit the line numbers): 2178 header(‘Content-type: text/html; charset=utf-8’); 2179 die(“EndAddField($field_json, \”$field_html\”);”); Next I am going to look into changing the .htaccess file for this system to see about editing the default content type which I think is causing the root of the error. Update Looks like the content type was a fix but it … Continue reading

Posted in Tech Tips | Tagged , | 3 Comments

[solved] raspberry pi: A window manager is already running on screen

A while ago I did a post about using remote desktop with raspberry pi – that was a fun, successful project. Now it’s been a while since I had to do the setup on a new raspberry pi machine and when I tried to remote desktop to my new pi I got this error: A window manager is already running on screen Well that’s no good! The problem turned out to be fairy easy to resolve: I was sshing into the pi as the root user ssh [email protected] -X but I should have been connecting as the pi user (ssh [email protected] -X) – once I got that straightened out and ssh’ed in and ran lxsession the GUI / remote desktop for pi fired right up!

Posted in Tech Tips | Tagged | Leave a comment

How to Allow Applications Downloaded from Anywhere – OSX Mountain Lion

Follow these simple steps to allow applications downloaded from anywhere to run on your OS X Mac: Step 1: Open System Preferences and then choose Security & Privacy Step 2 Choose the first tab: “General”: The bottom section may be grayed out: If so choose the “Lock Icon” in the bottom left: Under “Allow Applications Downloaded From” click the button to set it as “Anywhere” instead of “Mac App Store” or “Mac App Store and Identified Developers” Now try running your application and see if it works.

Posted in Mac, Security, Software, Tech Tips | Tagged | 1 Comment

Vim and Jailkit

Recently I installed Jailkit on Ubuntu 12.04 and then tried to use the vim editor to edit files as the jailed user (specifically a user jailed with the bash shell) and vim was behaving oddly. The colors on the terminal were just a gray (default color) and a bold white. After a little digging I found out this is how vim does syntax highlighting when it thinks that only two colors are available. Also, I was having trouble with the arrow keys not working – I could move around with HJKL but there also seemed to be lag and vim was hanging or would hang sometimes and was not responsive. I typed in set terminal and it told me ansi which is the default, “dumb” terminal. You can change vim to another terminal type, like xterm a few ways. Inside vim type :set term=xterm and that should do it Edit your .vimrc file (in your home directory) and add set term=xterm Before launching vim type export TERM=xterm to set an environmental variable Add that last command (export TERM=xterm) into one of your startup files like ‘~/.profileor ‘~/.bashrc This fixed the issue with the arrow keys, the lag and hanging, but I still only had two colors. After many hours of digging I realized that with Jailkit on Ubuntu even if you do jk_init -v /home/jail editors to install joe and vim and emacs you still get this problem. I did a stack trace on vim and even turned on debugging … Continue reading

Posted in Server Admin | Tagged , , | Leave a comment