Skip to content

Instantly share code, notes, and snippets.

View data-miner00's full-sized avatar

Shaun Chong data-miner00

View GitHub Profile
@t0yv0
t0yv0 / Binary.fs
Created July 14, 2011 15:00
Binary encoder/decoder for F# types.
module Serialization.Binary
exception EncodingError
exception NoEncoding of System.Type with
override this.ToString() =
sprintf "Failed to derive a binary encoding for type: %O" this.Data0
type E = (string -> int) -> System.IO.BinaryWriter -> obj -> unit
type D = (int -> string) -> System.IO.BinaryReader -> obj
@rtt
rtt / tinder-api-documentation.md
Last active May 17, 2025 02:57
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@roachhd
roachhd / README.md
Last active May 14, 2025 01:36
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@asierba
asierba / unittestconsole.cs
Last active January 20, 2025 16:29
How to mock console in unit tests
class Program
{
public static void Main(string[] args)
{
Console.WriteLine("What's your name?");
var name = Console.ReadLine();
Console.WriteLine(string.Format("Hello {0}!!", name));
}
[Test]
@wojteklu
wojteklu / clean_code.md
Last active May 19, 2025 15:26
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@laobubu
laobubu / ABOUT.md
Last active March 12, 2025 21:04
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@justalever
justalever / static-Gulpfile.js
Created April 7, 2017 04:37
A Gulp config for serving static sites.
'use strict';
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
imagemin = require('gulp-imagemin'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
watch = require('gulp-watch'),
sourcemaps = require('gulp-sourcemaps'),
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 19, 2025 13:34
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@subicura
subicura / config.conf
Created January 12, 2018 10:46
neofetch config
# Neofetch config file
# https://github.com/dylanaraps/neofetch
# Speed up script by not using unicode
export LC_ALL=C
export LANG=C
myprin() {
if [ "$2" ]; then
get_$2 &>/dev/null
@jamespaultg
jamespaultg / linearSVCgridsearch.py
Created March 16, 2018 07:12
Linear SVC grid search in Python
from sklearn.pipeline import Pipeline
from sklearn.svm import LinearSVC
from sklearn.model_selection import GridSearchCV
from sklearn.preprocessing import StandardScaler
SVCpipe = Pipeline([('scale', StandardScaler()),
('SVC',LinearSVC())])
# Gridsearch to determine the value of C
param_grid = {'SVC__C':np.arange(0.01,100,10)}