Skip to content

Instantly share code, notes, and snippets.

Joseph Bass jab416171

Block or report user

Report or block jab416171

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# � 2010 Western Digital Technologies, Inc. All rights reserved.
# Note: this is called by cron
jab416171 / myuser.sls
Last active Aug 29, 2015
sls file for adding a user
View myuser.sls
- present
- uid: 1234
- gid: 1234
- remove_groups: False
- password: $6$asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
- shell: /bin/bash
- home: /home/myuser
- require:
View gist:1e64ed837a6224c00701
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 63933
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
result=$(speedtest --simple)
download=$(echo $result | grep -oP "(?<=Download: )[0-9\.]* .*?/s")
upload=$(echo $result | grep -oP "(?<=Upload: )[0-9\.]* .*?/s")
ping=$(echo $result | grep -oP "(?<=Ping: )[0-9\.]* .*?ms")
if [ ! -e $filename ]; then
echo "\"Date\",\"Upload\",\"Download\",\"Ping\"" > $filename
echo "\"$(date)\",\"$upload\",\"$download\",\"$ping\"" >> $filename
sub foo(f)
a,b == 1,1
for i in range(f-1):
a,b = b,a+b
return str(a)
def bar(f:
if f=1 or f=2:
View gist:ef654f24bc5df5f14457
def insert_row(self, values, index=1):
""""Adds a row to the worksheet at the specified index and populates it with values.
Widens the worksheet if there are more values than columns.
:param values: List of values for the new row.
data_width = len(values)
if self.col_count < data_width:
View addToSpreadsheet
#!/usr/bin/env python
import gspread
import sys
import json
from oauth2client.client import SignedJwtAssertionCredentials
timestamp = sys.argv[1]
ping = sys.argv[2]
up = sys.argv[3]
down = sys.argv[4]
View contentscript.js
gcMessageDisplay.each(function(index, value) {
$('.next').eq(index).live('click', function() {
var parent = $(this).parent();
View gist:1631027
E/keystore( 832): chdir: /data/misc/keystore: No such file or directory
E/installd( 831): Could not create directories; exiting.
D/AndroidRuntime( 830):
D/AndroidRuntime( 830): >>>>>> AndroidRuntime START <<<<<<
D/AndroidRuntime( 830): CheckJNI is OFF
E/dalvikvm( 830): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 830): Unable to open or create cache for /system/framework/core.jar (/data/dalvik-cache/system@framework@core.jar@classes.dex)
D/dalvikvm( 830): Unable to process classpath element '/system/framework/core.jar'
E/dalvikvm( 830): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 830): Unable to open or create cache for /system/framework/core-junit.jar (/data/dalvik-cache/system@framework@core-junit.jar@classes.dex)
View taskDetails.js
/* The Ti.API.log lines print "undefined", but the labels still show up with the correct data. How?
* Ti.API.log calls the native logcat for Android and iOS, I could just do an alert and get the same results. */
for(property in task) {
var labelName = Ti.UI.createLabel({
var labelValue = Ti.UI.createLabel({
You can’t perform that action at this time.