Skip to content

Instantly share code, notes, and snippets.

View dongri's full-sized avatar
🥃

Dongri Jin dongri

🥃
View GitHub Profile
@dongri
dongri / H.264
Created August 7, 2012 06:23
H.264
#include <stdio.h>
#include <stdlib.h>
#define bool unsigned int
#define true 1
#define false 0
int profile = 0;
int level = 0;
int width = 0;
@dongri
dongri / advent.md
Created December 3, 2012 15:14 — forked from neotag/advent.md
Tech Pets Advent Calendar 2012

トラックボールは俺に任せろ

Develop!

Gris
(じつはめんどくさい)

Develop! Develop! Develop! Develop!

Gris
(だんだんイライラ)

@dongri
dongri / callme.php
Created January 29, 2013 04:58 — forked from suin/callme.php
<?php
$stdin = file_get_contents('php://stdin');
$data = json_decode($stdin, true);
// var_dump($data);
if ( is_array($data) === false )
{
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoffeeScript
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoffeeScript
curl -O https://raw.github.com/jashkenas/coffee-script-tmbundle/master/Syntaxes/CoffeeScript.tmLanguage
curl -O https://raw.github.com/jashkenas/coffee-script-tmbundle/master/Preferences/CoffeeScript.tmPreferences
/**
* Simply compares two string version values.
*
* Example:
* versionCompare('1.1', '1.2') => -1
* versionCompare('1.1', '1.1') => 0
* versionCompare('1.2', '1.1') => 1
* versionCompare('2.23.3', '2.22.3') => 1
*
* Returns:
def DongriServer
PRIORITY_HIGH = 1
PRIORITY_NORMAL = 2
PRIORITY_LOW = 3
me = Dongri.new
def request(user, job)
packages:
yum:
git: []
gcc: []
make: []
openssl-devel: []
commands:
00-add-home-variable:
command: sed -i 's/function error_exit/export HOME=\/root\n\nfunction error_exit/' /opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh
container_commands:
@dongri
dongri / gist:8571116
Created January 23, 2014 01:30
.ebextensions
010_packages.config
packages:
yum:
gcc: []
make: []
openssl-devel: []
libxml2: []
libxml2-devel: []
git: []
ImageMagick: []
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e