Skip to content

Instantly share code, notes, and snippets.

View beatak's full-sized avatar
🍄
Mushroom

Takashi M beatak

🍄
Mushroom
  • San Francisco, CA
View GitHub Profile
@beatak
beatak / gist:1188735
Created September 2, 2011 14:28
Disable persistant state by Application (browsers)
defaults write com.apple.Safari ApplePersistenceIgnoreState YES
defaults write org.mozilla.firefox ApplePersistenceIgnoreState YES
defaults write com.google.Chrome ApplePersistenceIgnoreState YES
@beatak
beatak / gist:1238606
Created September 23, 2011 22:27
cannot install npm...
npm% node cli.js install -g -f
node(45200,0x7fff7b89f960) malloc: *** error for object 0x7f9b8a815800: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
@beatak
beatak / gist:1268453
Created October 6, 2011 19:49
two search term combination with using ack.
ack SEARCH_TERM -u web tags | cut -d ':' -f1 | sort -u | xargs cat | grep ANOTHER_SEARCH_TERM
@beatak
beatak / gist:1329606
Created November 1, 2011 01:33
build error node on Mac OS X 10.7.2, Python 2.7.1
[ 5/35] libv8.a: deps/v8/SConstruct -> out/Release/libv8.a
Undefined symbols for architecture x86_64:
"operator delete(void*)", referenced from:
v8::internal::SnapshotByteSink::~SnapshotByteSink()in mksnapshot.o
PartialSnapshotSink::~PartialSnapshotSink()in mksnapshot.o
CppByteSink::~CppByteSink()in mksnapshot.o
v8::internal::ConstructFrame::~ConstructFrame()in accessors.o
v8::StartupDataDecompressor::~StartupDataDecompressor()in api.o
v8::String::ExternalStringResourceBase::~ExternalStringResourceBase()in api.o
v8::String::ExternalAsciiStringResource::~ExternalAsciiStringResource()in api.o
@beatak
beatak / gist:1447500
Created December 8, 2011 16:26
adium crash
Process: Adium [13980]
Path: /Applications/Adium.app/Contents/MacOS/Adium
Identifier: com.adiumX.adiumX
Version: 1.4.4 (1.4.4)
Code Type: X86 (Native)
Parent Process: launchd [127]
Date/Time: 2011-12-08 11:24:16.015 -0500
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9
@beatak
beatak / convert_css_to_sass.sh
Created December 30, 2011 21:25
Convert all css files to sass files by passing directory
#!/bin/sh
cut="/usr/bin/cut"
sass_convert="/usr/bin/sass-convert"
if [ $# -ne 1 ];then
echo "USAGE: convert_css_to_sass ~/target/directory"
exit
fi
if [ -z "$1" ];then
@beatak
beatak / dabblet.css
Created January 3, 2012 20:50
<script>alert(1);</script>
/**
* <script>alert(1);</script>
*/
body {
background-repeat: no-repeat;
background-image: url(http://arnor.io/site_media/static/img/highlight.png);
background-position: center top;
background-color: #2a292a;
}
@beatak
beatak / daemon.py
Created February 13, 2012 14:59
Make any python a daemon
#!/usr/bin/env python
import sys, os, time, atexit
from signal import SIGTERM
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
@beatak
beatak / brokenimage.js
Created March 19, 2012 22:45
find broken image
(function($){
if ($.fn.brokenimage) {
return false;
}
var RETRY = 1,
MILSEC_INTERVAL = 747;
$.fn.brokenimage = function(opt){
var options = {
@beatak
beatak / graphviz-2.28.0.pkg :: local.pkg :: Bom
Created April 16, 2012 20:55
files OS X version of graphviz-2.28.0.pkg installs (as CUI)
/usr/local/bin/acyclic
/usr/local/bin/bcomps
/usr/local/bin/ccomps
/usr/local/bin/circo
/usr/local/bin/cluster
/usr/local/bin/diffimg
/usr/local/bin/dijkstra
/usr/local/bin/dot
/usr/local/bin/dot2gxl
/usr/local/bin/dot_builtins