Skip to content

Instantly share code, notes, and snippets.

@eskim
eskim / rx2run.sh
Last active July 20, 2016 06:02
rx2run
#!/bin/sh
sudo apt-get install git avahi-utils tmux -y && \
git clone https://eskim@bitbucket.org/yichoe/rx2.ubuntu.git rx2 && \
cd rx2/bin
echo "sudo -i"
echo 'echo "options rtl8723be fwlps=0" > /etc/modprobe.d/rtl8723be.conf'
echo 'modprobe -r rtl8723be'
echo 'modprobe rtl8723be'
@eskim
eskim / gist:8440483
Created January 15, 2014 17:27
jquery deferred sequential
We couldn’t find that file to show.
@eskim
eskim / gist:7860384
Created December 8, 2013 17:13
PHP naver geocode
public static function nhnGeocode($addr)
{
return Cache::sear('geocode.'.$addr, function() use($addr){
$api_key = Config::get('3rdparty.naver_api_key');
$result_xml = File::getRemote("http://openapi.map.naver.com/api/geocode.php?key=$api_key&encoding=utf-8&coord=latlng&query=" . $addr);
$xml = new SimpleXMLElement($result_xml);
$lng = $xml->item[0]->point->x;
$lat = $xml->item[0]->point->y;
@eskim
eskim / README.md
Created October 16, 2012 13:20 — forked from mbostock/.block
Epicyclic Gearing

From Wikipedia: Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Built with D3.js.

@eskim
eskim / dabblet.css
Created October 16, 2012 13:04
Untitled
body {
font-size: 10px;
color: red;
}
@eskim
eskim / client.js
Created August 21, 2012 12:58 — forked from cypres/client.js
node.js thrift exception test
var thrift = require('thrift');
var test = require('./gen-nodejs/test.js'),
ttypes = require('./gen-nodejs/test_types');
var connection = thrift.createConnection('localhost', 9090),
client = thrift.createClient(test, connection);
connection.on('error', function(err) {
console.error(err);
@eskim
eskim / redis.markdown
Created August 18, 2012 14:03 — forked from bdotdub/redis.markdown
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@eskim
eskim / deploy.rb
Created August 15, 2012 07:55 — forked from jeroenr/deploy.rb
Deploying play2 application with capistrano
set :deploy_to, "/usr/share/my-app"
namespace :play do
task :setup do
run "mkdir -p #{deploy_to}"
upload "my-app/start.sh", "#{deploy_to}/start.sh", :mode => '755', :via => :scp
upload "my-app/stop.sh", "#{deploy_to}/stop.sh", :mode => '755', :via => :scp
end
task :deploy do
@eskim
eskim / config.rb
Created August 15, 2012 07:54 — forked from jeroenr/config.rb
Capistrano deployment script for play2 application
namespace :deploy do
task :restart do
stop
sleep 1
start
end
task :start do
targets = find_servers_for_task(current_task)
@eskim
eskim / gist:3356576
Created August 15, 2012 05:50
tomcat upstart
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# adapt paths, if needed
env JAVA_HOME=/opt/java
env CATALINA_HOME=/opt/apache-tomcat