Skip to content

Instantly share code, notes, and snippets.

View gokaybiz's full-sized avatar
🌪️
Focusing

gokaybiz

🌪️
Focusing
View GitHub Profile
@miguelmota
miguelmota / index.js
Created December 20, 2016 19:42
Node.js equivalent of Python's if __name__ == '__main__'
function main() {}
if (require.main === module) {
main();
}
/**
* coder: kodo no kami
* face: www.facebook.com/hacker.fts315
* date: 21/04/2015
**/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv){
@coreycoto
coreycoto / gist:6aa445806a832f7f7386
Last active February 2, 2024 11:50
Windows Boxstarter
cinst -y googlechrome
cinst -y firefox
cinst -y fiddler4
cinst -y atom
cinst -y 7zip
cinst -y paint.net
cinst -y git
cinst -y poshgit
cinst -y gitextensions
cinst -y wget
@mmcdaris
mmcdaris / go_build_man.md
Last active March 21, 2024 09:59
going through the go build command

usage

go build: compiles the packages named by the import paths, along with their dependencies, the binary does not end up in $GOPATH/bin it gets created in the dirs

go build [-o output] [build flags] [packages]

If the [packages] are a list of .go files, build treats them as a list of source files specifying a single package.

@gerner
gerner / gist:8201345
Created December 31, 2013 19:46
Hex decoding/encoding
public class HexDecoder {
//lower ascii only
private static int[] HEX_TO_INT = new int[] {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, //0-15
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, //16-31
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, //32-47
0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1, //48-63
-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, //64-79
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, //80-95
@henriquemoody
henriquemoody / http-status-codes.php
Last active January 26, 2024 10:29
List of HTTP status codes in PHP
<?php
/**
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
*
* You may also want a list of unofficial codes:
*
* 103 => 'Checkpoint',
* 218 => 'This is fine', // Apache Web Server
* 419 => 'Page Expired', // Laravel Framework
@ryanfitz
ryanfitz / golang-nuts.go
Created December 2, 2012 22:45
two ways to call a function every 2 seconds
package main
import (
"fmt"
"time"
)
// Suggestions from golang-nuts
// http://play.golang.org/p/Ctg3_AQisl
@chrishuan9
chrishuan9 / Hex2StringMain.java
Created April 17, 2012 20:47
Convert String to Hex and Hex to String
import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author EtaYuy88
*/
public class Main {