Skip to content

Instantly share code, notes, and snippets.

View ryush00's full-sized avatar

SeongHoon Ryu ryush00

  • South Korea
  • 05:12 (UTC +09:00)
View GitHub Profile
@ryush00
ryush00 / install-rbenv-amazon-linux-ami.sh
Last active July 13, 2022 06:49 — forked from luisbebop/install-rbenv-amazon-linux-ami.sh
Install rbenv on Amazon Linux AMI
sudo yum install -y git gcc make readline-devel openssl-devel
git clone https://github.com/rbenv/rbenv ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
# Install ruby-build system-widely
git clone https://github.com/rbenv/ruby-build /tmp/ruby-build
cd /tmp/ruby-build
@ryush00
ryush00 / number.rb
Last active May 6, 2017 12:45
거누와 함께하는 배스킨라빈스 게임!
# COPYRIGHT ryush00
# 사용법
# number.rb 반복수 시작수]
n = ARGV[1].to_i
time = ARGV.first.to_i
string = ""
time.times do
@ryush00
ryush00 / gist:804e58b3caa2e4e568dc3bf93b297d3e
Created March 11, 2017 17:36
AWS Cloudfront ip ranges
13.32.0.0/15
13.54.63.128/26
34.195.252.0/24
35.162.63.192/26
52.15.127.128/26
52.46.0.0/18
52.52.191.128/26
52.56.127.0/25
52.57.254.0/24
52.66.194.128/26
@ryush00
ryush00 / KINX Cloud Comparison.md
Last active February 21, 2017 19:13
Comparison UnixBench results of Kinx, iwinV (Korea Hosting Company) and Linode, DigitalOcean, GCE, Vultr.

###GCE 1GB RAM + 1 CPU

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: instance-1: GNU/Linux
   OS: GNU/Linux -- 4.4.0-43-generic -- #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016
   Machine: x86_64 (x86_64)
@ryush00
ryush00 / gist:ffb5601cb8de95d24cfc
Created June 15, 2015 09:15
Download all skins from agar.io
require "open-uri"
skins = "poland;usa;china;russia;canada;australia;spain;brazil;germany;ukraine;france;sweden;hitler;north korea;south korea;japan;united kingdom;earth;greece;latvia;lithuania;estonia;finland;norway;cia;maldivas;austria;nigeria;reddit;yaranaika;confederate;9gag;indiana;4chan;italy;bulgaria;tumblr;2ch.hk;hong kong;portugal;jamaica;german empire;mexico;sanik;switzerland;croatia;chile;indonesia;bangladesh;thailand;iran;iraq;peru;moon;botswana;bosnia;netherlands;european union;taiwan;pakistan;hungary;satanist;qing dynasty;matriarchy;patriarchy;feminism;ireland;texas;facepunch;prodota;cambodia;steam;piccolo;ea;india;kc;denmark;quebec;ayy lmao;sealand;bait;tsarist russia;origin;vinesauce;stalin;belgium;luxembourg;stussy;prussia;8ch;argentina;scotland;sir;romania;belarus;wojak;doge;nasa;byzantium;imperial japan;french kingdom;somalia;turkey;mars;pokerface;8;irs;receita federal;facebook".split(";")
skins.each do |skin|
begin
puts skin + " 다운중"
var http = require('http');
http.get(url, function(res) {
res.pipe(iconv.decodeStream('KS_C_5601-1987')).collect(function(err, decodedBody) {
console.log(decodedBody);
});
});
@ryush00
ryush00 / cloudflare.sh
Last active July 31, 2016 15:54
Add ip subnets to nginx config from cloudflare website.
#! /bin/bash
# The original source
# I don't know who made it.
# Update cloudflare.conf with new IPs
#
cloudFlareConf="/etc/nginx/conf.d/cloudflare.conf"
IPV4=$(curl -s "https://www.cloudflare.com/ips-v4")
IPV6=$(curl -s "https://www.cloudflare.com/ips-v6")
DATE="$(date)"
@ryush00
ryush00 / gist:f580229e070555b154fb
Created February 23, 2016 17:21 — forked from wedtm/gist:1906478
Ruby based Minecraft Vanilla Query Check
#
# Tested on 1.9.2-p290, Written by Miles Smith (WedTM)
#
require 'socket'
class MCQuery
MAGIC_PREFIX = "\xFE\xFD"
PACKET_TYPE_CHALLENGE = "\x09"
PACKET_TYPE_QUERY = "\x00"
require 'socket'
##
# Pings a minecraft server and returns motd and playercount.
# Works with ruby >=1.9.3/2.0.0
#
# More information and sample code here:
# http://wiki.vg/Server_List_Ping
##
class MinecraftPing
@ryush00
ryush00 / thumb.rb
Created December 21, 2015 15:44
동일 폴더의 모든 동영상의 썸네일 사진 만들기
var ffmpeg = require('fluent-ffmpeg');
var fs = require('fs');
var files = fs.readdirSync(__dirname);
var path = require('path');
for(var i in files) {
if(path.extname(files[i]) === ".mp4") {