Skip to content

Instantly share code, notes, and snippets.

@soarez
soarez / ca.md
Last active May 3, 2024 00:04
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@pesterhazy
pesterhazy / git-ag
Created March 1, 2014 17:55
Search your git repository using ag (the silver searcher)
#!/bin/bash
# Put additional ignore patterns (one by line) in .grepignore
#
git-ag () {
if [[ "$1" = "-a" ]]
then
all=1
shift
import java.util.Arrays;
public class MakeChange
{
// Returns the count of all possible ways to make exact change for the
// given total using the coin denominations in the coins[] array.
//
// Each coin can be used more than once, but the order of the coins is
// irrelevant (in other words, "1, 1, 2" and "1, 2, 1" count as a
// single possibility.)
import java.util.Arrays;
public class MakeChange
{
// Returns the count of all possible ways to make exact change for the
// given total using the coin denominations in the coins[] array.
//
// Each coin can be used more than once, but the order of the coins is
// irrelevant (in other words, "1, 1, 2" and "1, 2, 1" count as a
// single possibility.)
@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@coderberry
coderberry / chrome-cheat-sheet.md
Last active March 10, 2023 13:56
Chrome Canary Console Cheat Sheet
;; Set up slime-js
;;
;; To install, see https://github.com/swank-js/swank-js/wiki/Installation
;;
;; This is what I did:
;;
;; npm install swank-js -g
;; M-x package-install slime-js
;;
;; The slime-js version in marmalade requires swank 2010.04.04, or at least
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@karlhorky
karlhorky / grayscale-disable.css
Created August 26, 2012 12:17
Cross-Browser CSS Grayscale
img.grayscale.disabled {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale");
-webkit-filter: grayscale(0%);
}
@gre
gre / easing.js
Last active April 30, 2024 04:58
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 = {