Skip to content

Instantly share code, notes, and snippets.

View ionull's full-sized avatar
🎯
Focusing

Tsung Wu ionull

🎯
Focusing
View GitHub Profile
@ionull
ionull / K20redis
Created January 4, 2011 02:32
/etc/rc0.d/K20redis
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title>
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script>
<script type="text/javascript" charset="utf-8">
$(function () {
var extractToken = function(hash) {
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder
@ionull
ionull / gist:5632901
Created May 23, 2013 05:18
zygote start
D/MountService( 1681): volume state changed for /storage/UsbDriveB (null -> removed)
I/MountService( 1681): Updating valid state removed
D/MountService( 1681): updatePublicVolumeState :: path = /storage/UsbDriveC, state = removed
D/MountService( 1681): volume state changed for /storage/UsbDriveC (null -> removed)
I/MountService( 1681): Updating valid state removed
D/MountService( 1681): updatePublicVolumeState :: path = /storage/UsbDriveD, state = removed
D/MountService( 1681): volume state changed for /storage/UsbDriveD (null -> removed)
I/MountService( 1681): Updating valid state removed
D/MountService( 1681): updatePublicVolumeState :: path = /storage/UsbDriveE, state = removed
D/MountService( 1681): volume state changed for /storage/UsbDriveE (null -> removed)
Gson Type Adapters for Common Classes
JodaTime Classes
DateTime
private static class DateTimeTypeConverter
implements JsonSerializer<DateTime>, JsonDeserializer<DateTime> {
@Override
public JsonElement serialize(DateTime src, Type srcType, JsonSerializationContext context) {
return new JsonPrimitive(src.toString());
@ionull
ionull / gist:fdddb0a9910b768239d5
Created October 1, 2014 14:21
CSGO Mac OS X crash log
Process: csgo_osx [93707]
Path: /Users/USER/Library/Application Support/Steam/*/csgo_osx
Identifier: csgo_osx
Version: ???
Code Type: X86 (Native)
Parent Process: bash [93704]
Responsible: steam_osx [85725]
User ID: 502
Date/Time: 2014-09-23 23:56:25.230 +0800
@ionull
ionull / gist:a26a6b81f35b50482886
Created October 1, 2014 14:33
rMBP information
Processor Information:
Model: MacBookPro10,1
Vendor: GenuineIntel
CPU Family: 0x6
CPU Model: 0x3a
CPU Stepping: 0x9
CPU Type: 0x0
Speed: 2300 Mhz
8 logical processors
4 physical processors
@ionull
ionull / gist:77c6c5a271cf1c2eff49
Created October 1, 2014 16:18
csgo console log at start(without playing)
Failed to load gamerulescvars.txt, game rules cvars might not be reported to management tools.
Parent cvar in client.dll not allowed (cl_remove_old_ugc_downloads)
Parent cvar in client.dll not allowed (mp_endmatch_votenextleveltime)
Parent cvar in client.dll not allowed (mp_verbose_changelevel_spew)
maxplayers set to 64
Error: Material "debug/debugluxels" uses unknown shader "DebugLuxels"
KV Conditional: Unknown symbol INPUTSWAPAB
KV Conditional: Unknown symbol INPUTSWAPAB
Error: Material "___fillrate_0" uses unknown shader "FillRate"
Error: Material "___debugnormalmap_1" uses unknown shader "DebugNormalMap"
// Post a notification indicating whether a doodle was found.
private void sendNotification(String msg, Bundle bundle) {
mNotificationManager = (NotificationManager)
this.getSystemService(Context.NOTIFICATION_SERVICE);
Intent intent = new Intent(this, NotificationActivity.class);
intent.putExtras(bundle);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
intent, 0);
@ionull
ionull / gist:70e49fd3f5c23ee9f334
Created December 11, 2014 17:19
CSGO Crash Log
Process: csgo_osx [96288]
Path: /Users/USER/Library/Application Support/Steam/*/csgo_osx
Identifier: csgo_osx
Version: ???
Code Type: X86 (Native)
Parent Process: bash [96285]
Responsible: steam_osx [77183]
User ID: 502
Date/Time: 2014-12-12 01:15:38.502 +0800