Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Christensen christianchristensen

View GitHub Profile
View json_pretty.user.js
javascript:(function(){function FormatJSON(oData,sIndent){if(arguments.length<2){var sIndent="";}var sIndentStyle=" ";var sDataType=RealTypeOf(oData);console.log(sDataType);if(sDataType=="array"){if(oData.length==0){return"[]";}var sHTML="[";}else{var iCount=0;$.each(oData,function(){iCount++;return;});if(iCount==0){return"{}";}var sHTML="{";}var iCount=0;$.each(oData,function(sKey,vValue){if(iCount>0){sHTML+=",";}if(sDataType=="array"){sHTML+=("\n"+sIndent+sIndentStyle);}else{sHTML+=("\n"+sIndent+sIndentStyle+"\""+sKey+"\""+": ");}switch(RealTypeOf(vValue)){case"array":case"object":sHTML+=FormatJSON(vValue,(sIndent+sIndentStyle));break;case"boolean":case"number":sHTML+=vValue.toString();break;case"null":sHTML+="null";break;case"string":sHTML+=("\""+vValue+"\"");break;default:sHTML+=("TYPEOF: "+typeof(vValue));}iCount++;});if(sDataType=="array"){sHTML+=("\n"+sIndent+"]");}else{sHTML+=("\n"+sIndent+"}");}return sHTML;}function SortObject(oData){var oNewData={};var aSortArray=[];$.each(oData,function(sKey){a
@christianchristensen
christianchristensen / .gitignore
Created Nov 21, 2011
Git ignore file for committing hudson/jenkins configs to version control.
View .gitignore
*.log
jobs/*/workspace
jobs/*/builds
jobs/*/lastStable
jobs/*/lastSuccessful
jobs/*/nextBuildNumber
updates
.owner
@christianchristensen
christianchristensen / .gitignore
Last active Jun 14, 2020
Simple PHP Graph data-structure.
View CloudTabs.py
import json
import sqlite3
import zlib
# ~/Library/Safari/CloudTabs.db
# Ref: https://www.reddit.com/r/mac/comments/89qx5n/iphone_safari_tabs_into_text_list_via_icloud/
db = sqlite3.connect('CloudTabs.db')
tabs = []
View radio_rpi_sdr.md
View Motorola_SB6141_cmSignalData.py
#!/usr/bin/env python
# Parser for Motorola SB6141 Signal page
# Motorola_SB6141_cmSignalData.py <tablename> <column>
# Specify the tablename to return all available (Zabbix LLD format) Bonding Channel Values
# Specity tablename and column to return a specific value for the table and channel
# Data based on Model Name: SB6141, Firmware Name: SB_KOMODO-1.0.6.16-SCM00-NOSH
# Downstream: Frequency, Signal to Noise Ratio, Downstream Modulation, Power Level
# Upstream: Frequency, Ranging Service ID, Symbol Rate, Power Level, Upstream Modulation, Ranging Status
# Signal Stats (Codewords): Total Unerrored Codewords, Total Correctable Codewords, Total Uncorrectable Codewords