Skip to content

Instantly share code, notes, and snippets.

Sam Steele c99koder

Block or report user

Report or block c99koder

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
View git_revision.sh
if [ $CONFIGURATION == "AppStore" ]; then
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" $PROJECT_DIR/IRCCloud/IRCCloud-Info.plist)
else
bN=$(/usr/bin/git rev-parse --short HEAD)
fi
echo -n "#define GIT_VERSION " > $PROJECT_DIR/IRCCloud/InfoPlist.h
echo $bN >> $PROJECT_DIR/IRCCloud/InfoPlist.h
touch $PROJECT_DIR/IRCCloud/IRCCloud-Info.plist
View x360ce.ini
[Options]
UseInitBeep=1
Log=0
Console=0
DebugMode=0
InternetDatabaseUrl=http://www.x360ce.com/webservices/x360ce.asmx
InternetFeatures=1
InternetAutoload=1
AllowOnlyOneCopy=1
[InputHook]
View gist:201d7aad10352208a813
from ws4py.client.threadedclient import WebSocketClient
class DummyClient(WebSocketClient):
def opened(self):
print "Opened websocket"
def closed(self, code, reason=None):
print "Closed down", code, reason
def received_message(self, m):
View SSL.java
TrustManager[] tms = new TrustManager[1];
tms[0] = new X509TrustManager() {
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
throw new CertificateException("Not implemented");
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
try {
@c99koder
c99koder / HelloSparkCore.cpp
Last active Jan 1, 2016
Hello World for SparkCore Arduino firmware and AdaFruit 16x2 OLED display
View HelloSparkCore.cpp
// Uses an Adafruit OLED on pins D0 - D6 for output, see http://www.adafruit.com/products/823
/* LCD RS pin to digital pin 0
* LCD R/W pin to digital pin 1
* LCD Enable pin to digital pin 2
* LCD D4 pin to digital pin 3
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 5
* LCD D7 pin to digital pin 6
*/
@c99koder
c99koder / prompt.sh
Created Dec 18, 2013
My bash prompt that probably came from Laurie or someone else at Last.fm
View prompt.sh
# User specific aliases and functions
RED="\[\033[31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_BLUE="\[\033[1;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
@c99koder
c99koder / pebble.applescript
Last active Dec 7, 2017
Forward iMessges to Pebble using PushOver. Fill in your APP_TOKEN and USER_KEY. In the "Alerts" tab of Messages' settings, tell it to run this script for "Message Received" and "Text Invitation"
View pebble.applescript
on push(title, message)
set APP_TOKEN to "..."
set USER_KEY to "..."
do shell script "curl -s -F token=" & APP_TOKEN & " -F user=" & USER_KEY & " -F title=\"" & title & "\" -F message=\"" & message & "\" https://api.pushover.net/1/messages.json"
return
end push
using terms from application "Messages"
on message received theMessage from theBuddy for theChat
@c99koder
c99koder / gatecontrol.lua
Created Apr 7, 2013
ComputerCraft script for controlling my RedPower frame castle gate
View gatecontrol.lua
-- Castle Gate Control
-- Opens and closes a redpower frame gate at the push of a button
local side = "left" -- Bundled cable location
local alarmSide = "back" -- Howler alarm location
function enableWire(color) -- Turn on a colored wire in the bundle without affecting the other colors
local currentSet = rs.getBundledOutput(side)
if not colors.test(currentSet, color) then
currentSet = colors.combine(currentSet, color)
@c99koder
c99koder / refinery.lua
Created Aug 25, 2012
ComputerCraft lua script to control an IndustrialCraft refinery in Minecraft
View refinery.lua
-- ComputerCraft oil refinery controller
-- Alternates between two banks of combustion engines so the engines don't overheat and explode
function enableWire(color) -- Turn on a colored wire in the bundle without affecting the other colors
local currentSet = rs.getBundledOutput("back")
if not colors.test(currentSet, color) then
currentSet = colors.combine(currentSet, color)
rs.setBundledOutput("back", currentSet)
end
end
View gist:232389
intent = new Intent( Intent.ACTION_VIEW );
intent.setComponent(new ComponentName("fm.last.android","fm.last.android.activity.Tag"));
intent.putExtra("lastfm.artist", "The Postal Service");
intent.putExtra("lastfm.track", "Such Great Heights");
startActivity( intent );
You can’t perform that action at this time.