Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
This file contains hidden or 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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
This file contains hidden or 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
public class NumbersNames{ | |
private static final String[] tensNames = { "", " ten", " twenty", | |
" thirty", " forty", " fifty", " sixty", " seventy", " eighty", | |
" ninety" }; | |
private static final String[] numNames = { "zero", " one", " two", | |
" three", " four", " five", " six", " seven", " eight", " nine", | |
" ten", " eleven", " twelve", " thirteen", " fourteen", " fifteen", | |
" sixteen", " seventeen", " eighteen", " nineteen" }; | |
private static String[] daysOfWeek = { "", "Sunday", "Monday", "Tuesday", |
This file contains hidden or 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
isql -user SYSDBA -password masterkey /var/firebird/database.fdb -i "/home/tux/sql/command.sql" -o "/home/tux/log/log.txt" |
This file contains hidden or 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
#!/bin/bash | |
# Functions ============================================== | |
# return 1 if global command line program installed, else 0 | |
# example | |
# echo "node: $(program_is_installed node)" | |
function program_is_installed { | |
# set to 1 initially | |
local return_=1 |
This file contains hidden or 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
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
This file contains hidden or 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
#!/bin/sh | |
## | |
## Redhat / Linux / LSB | |
## | |
# chkconfig: 345 80 20 | |
# description: Startup script for Express / Node.js application with the \ | |
## forever module. | |
## | |
## A modification of https://gist.github.com/1339289 | |
## |
This file contains hidden or 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
CREATE TABLE Filename | |
( | |
FilenameId serial not null, | |
Name text not null, | |
primary key (FilenameId) | |
); | |
ALTER TABLE Filename ALTER COLUMN Name SET STATISTICS 1000; | |
CREATE UNIQUE INDEX filename_name_idx on Filename (Name); |
This file contains hidden or 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
### | |
### Debian configuration | |
### | |
# --- Bashrc --- | |
echo " |
OlderNewer