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 'bcrypt' | |
module Gencore | |
class User < Sequel::Model | |
set_schema do | |
primary_key :id | |
varchar :username | |
text :passwd, :default => '*' | |
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
#!/usr/bin/env python | |
import gconf, os, time, pynotify | |
from PIL import Image | |
pynotify.init("BgChanger") | |
DEFAULTWPDIR = "/usr/share/backgrounds" | |
NTITLE = "Up Next..." |
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 Cashier | |
@@tokens = {100 => 1, 200 => 4, 500 => 2, 1000 => 2, 2000 => 2, 5000 => 2, 10000 => 2, 20000 => 1, 50000 => 0, 100000 => 0} | |
def givemychange(ch) | |
@change = [] | |
p = @@tokens.keys.sort.reverse | |
p.each do |money| | |
temp = ch / money | |
next if temp == 0 or @@tokens[money] == 0 |
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
diff --git a/command.c b/command.c | |
index de7f1fb..c0e0087 100644 | |
--- a/command.c | |
+++ b/command.c | |
@@ -3289,12 +3289,13 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) | |
case MP_CMD_SCREENSHOT: | |
if (mpctx->video_out && mpctx->video_out->config_ok) { | |
+ char *fname = get_metadata(mpctx, META_NAME); | |
+ void* param[2] = {&cmd->args[0].v.i, fname}; |
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 main | |
import ( | |
"http" | |
"runtime" | |
"log" | |
"flag" | |
"os" | |
) |
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
/* | |
* synchro Test Suite Macro collection | |
* synchro is collection of simple macro | |
* I used to test my C/C++ unit. | |
* The design itself is dead simple and | |
* straight-forward, since I found another | |
* Unit Test tool for C/C++ is either bloated or | |
* simply not enough for my need. | |
* If you read this source and has intention to use it, | |
* go on, I hereby permit the use of this source code |
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 p(a) | |
print a | |
print "\n" | |
end | |
def a(ab, *test) | |
p test.inspect | |
end | |
a(1,:ss => "123", :ab => 123) |
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
from __future__ import with_statement | |
from fabric.api import * | |
from posixpath import basename | |
version = "1.5.7" | |
what="http://nginx.org/download/nginx-%s.tar.gz" % version | |
prefix="/opt/nginx" | |
opt = "--prefix=/opt/nginx --with-openssl=../openssl-1.0.1e --with-pcre --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-ipv6 --with-http_image_filter_module" | |
env.hosts = [""] |
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
from fabric.api import * | |
from fabric import contrib | |
# Put your server address here | |
env.host_string = "192.168.0.133:2221" | |
env.user = "hg" | |
# Put your username here | |
user="adie" |
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
#include "jsc.h" | |
#include "main.js" |
OlderNewer