Skip to content

Instantly share code, notes, and snippets.

@katsu-o
katsu-o / 00-install.txt
Last active January 19, 2019 14:53
Settings of tslint/prettier after scaffolding by CRA(TypeScript)
# create-react-app
> create-react-app --scripts-version=react-scripts-ts <your-project>
> cd <your-project>
# tslint, prettier
> yarn add --dev tslint prettier tslint-config-prettier tslint-config-airbnb tslint-plugin-prettier
@fhfaa
fhfaa / CustomRules.js
Last active September 8, 2023 16:46
CORS ALL the things in Fiddler2
import System;
import System.Windows.Forms;
import Fiddler;
// INTRODUCTION
//
// Well, hello there!
//
// Don't be scared! :-)
//
@bignimbus
bignimbus / applyAndCall.js
Last active August 29, 2015 14:01
A brief explanation of JavaScript's native .apply() and .call() functions.
// In a recent interview I was stumped by a question about JS's native
// function.apply() and function.call() methods. I resolved to learn more
// about why these methods are useful to a JS developer. Here's what I now
// understand:
// let's make a simple function that introduces an individual.
// We pass arguments defining the interests of the individual.
// The greeting is personalized by the value of this.name.
function introduceMe (interest1, interest2) {
var that = this;
@jimothyGator
jimothyGator / README.md
Last active August 25, 2024 17:37
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@gre
gre / easing.js
Last active September 21, 2024 22:06
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {