Skip to content

Instantly share code, notes, and snippets.

View sydneyitguy's full-sized avatar

seb's sydneyitguy

  • Seoul, Korea
View GitHub Profile
@sydneyitguy
sydneyitguy / eth-key.rb
Last active August 10, 2018 05:30
Generate a Ethereum key pair / Get public key from a given private key (if a parameter passed)
#!/usr/bin/env ruby
# gem install digest-sha3
require 'openssl'
require 'digest/sha3'
require 'open-uri'
require 'json'
def decode(s, base)
syms = '0123456789abcdef'.freeze
@seancdavis
seancdavis / notify_slack.rb
Created December 7, 2015 12:55
Post incoming webhook to Slack using Ruby
# Assumes:
# - curl is installed
# - you have a slack channel with an incoming webhook configured
require 'json'
def notify_slack(webhook_url, channel, username, text, image)
payload = {
:channel => channel,
:username => username,
@marocchino
marocchino / 094607.md
Last active July 19, 2022 14:25
ES6시대의 JavaScript

ES6시대의 JavaScript

안녕하세요. 사원사업부의 마루야마@h13i32maru입니다. 최근의 Web 프론트엔드의 변화는 매우 격렬해서, 조금 눈을 땐 사이에 점점 새로운 것이 나오고 있더라구요. 그런 격렬한 변화중 하나가 ES6이라는 차세대 JavaScript의 사양입니다. 이 ES6는 현재 재정중으로 집필시점에서는 Draft Rev31이 공개되어있습니다.

JavaScript는 ECMAScript(ECMA262)라는 사양을 기반으로 구현되어있습니다. 현재 모던한 Web 브라우저는 ECMAScript 5.1th Edition을 기반으로 한 JavaScript실행 엔진을 탑재하고 있습니다. 그리고 다음 버전인 ECMAScript 6th Edition이 현재 재정중으로, 약칭으로 ES6이라는 명칭이 사용되고 있습니다.

@staltz
staltz / introrx.md
Last active July 4, 2024 10:11
The introduction to Reactive Programming you've been missing
@sydneyitguy
sydneyitguy / gitconfig
Last active September 13, 2016 09:10
Git config file: .gitconfig
[user]
name = Sebastian Kim
email = email@gmail.com
[color]
status = auto
branch = auto
diff = auto
ui = auto
@sydneyitguy
sydneyitguy / .bash_profile
Last active October 6, 2015 05:27
My Bash Profile
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\[\033[0;32m\]\w\[\033[00m\]\$(parse_git_branch)\\$ "
alias ll='ls -la'
alias l='ls -CF'
@Ph3nol
Ph3nol / sphinx-macosx.sh
Created June 6, 2012 05:14 — forked from ubermuda/sphinx-macosx.sh
Installing sphinxsearch on macosx
# first sphinx
brew install sphinx
# the formula does not install libsphinxclient :/
wget http://sphinxsearch.com/files/sphinx-2.0.4-release.tar.gz
tar xzf sphinx-2.0.4-release.tar.gz
cd sphinx-2.0.4-release/api/libsphinxclient/
CXXCPP="gcc -E" ./configure --prefix=/usr/local
make
make install
@andyvanee
andyvanee / Rakefile
Created September 21, 2011 16:19
Rake migrate without rails
require 'active_record'
require 'yaml'
require 'mysql'
require 'logger'
task :default => :migrate
desc "Migrate the database through scripts in db/migrate. Target specific version with VERSION=x"
task :migrate => :environment do
ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil )
@adamstegman
adamstegman / spec_helper.rb
Created April 19, 2011 05:28
Silence RSpec specs
RSpec.configure do |config|
config.before(:all, &:silence_output)
config.after(:all, &:enable_output)
end
# Redirects stderr and stdout to /dev/null.
def silence_output
@orig_stderr = $stderr
@orig_stdout = $stdout