Skip to content

Instantly share code, notes, and snippets.

View data-miner00's full-sized avatar

Shaun Chong data-miner00

View GitHub Profile
@mtimbs
mtimbs / tsconfig.json
Last active April 25, 2025 03:07
basic default tsconfig for use in TypeScript projects
{
"compilerOptions": {
// project options
"lib": [
"ESNext",
"dom"
], // specifies which default set of type definitions to use ("DOM", "ES6", etc)
"outDir": "lib", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory.,
"removeComments": true, // Strips all comments from TypeScript files when converting into JavaScript- you rarely read compiled code so this saves space
"target": "ES6", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3)
@jlyonsmith
jlyonsmith / Mac Keyboard Symbols.md
Last active May 6, 2025 11:41 — forked from Zenexer/Mac Keyboard Symbols.md
List of Mac/Apple keyboard symbols

Common symbols

Modifiers

When a key combination is displayed, the modifiers are written in the order presented here. For example, Control + Option + Shift + Command + Q would be written as ⌃⌥⇧⌘Q.

Sym Key Alt
Control
Option
@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)}
@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
@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

@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'),
@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
@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

@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]
@roachhd
roachhd / README.md
Last active May 14, 2025 01:36
Basics of BrainFuck

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

BrainFuck Programming Tutorial by: Katie

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

INTRODUCTION