This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
10.times do | |
Thread.new do | |
while true | |
uri = URI('http://jspiner.net/') | |
Net::HTTP.get(uri) | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'eventmachine' | |
require 'Win32API' | |
$t = Win32API.new("kernel32", "GetTickCount", nil, 'L') | |
$t.call() | |
class Packet | |
attr_accessor :id | |
attr_accessor :size | |
attr_accessor :data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'opengl' | |
require 'glu' | |
require 'glut' | |
$x = 0 | |
$y = 0 | |
def onMove(x,y) | |
$x = x | |
$y = y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_random_string(length = 8) | |
buffer = String.new | |
for i in 0..length | |
rnd = rand(26 + 26 + 10) | |
case rnd | |
when 0..25 | |
buffer << (rand(26) + 'a'.ord).chr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package anz.library.meal; | |
import java.io.IOException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.List; | |
import net.htmlparser.jericho.Element; | |
import net.htmlparser.jericho.Segment; | |
import net.htmlparser.jericho.Source; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 현재 유닉스 타임을 얻어온다 | |
def getCurrentUnixTime | |
Time.new.to_i | |
end | |
# 해당 유닉스 타임에 대한 타임 토큰을 계산한다 | |
def getTimeToken(unix_time, token_size) | |
unix_time / token_size | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Diagnostics; | |
using Sce.PlayStation.Core; | |
using Sce.PlayStation.Core.Graphics; | |
using Sce.PlayStation.Core.Imaging; | |
using Sce.PlayStation.Core.Environment; | |
using Sce.PlayStation.Core.Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CircularQueue | |
def initialize(size = 32) | |
@data = Array.new | |
@size = size | |
@sp = 0 | |
@ep = 0 | |
end | |
def enqueue(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char* filetobuf(char *file) | |
{ | |
FILE *fptr; | |
long length; | |
char *buf; | |
fptr = fopen(file, "rb"); /* Open file for reading */ | |
if (!fptr) /* Return NULL on failure */ | |
return NULL; | |
fseek(fptr, 0, SEEK_END); /* Seek to the end of the file */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'net/http/persistent' | |
require 'json' | |
SERVER_PREFIX = "http://anz.previrtu.com/test/" | |
# 발급받는곳 | |
# http://anz.previrtu.com/test/generate_app_token.php?name=app_name | |
CLIENT_ID = "c9b7a5b47fb09db8e9b4302ea86b32f0" |
OlderNewer