Skip to content

Instantly share code, notes, and snippets.

View jordaaash's full-sized avatar
🌴
Not on vacation, I just love palm trees

Jordan jordaaash

🌴
Not on vacation, I just love palm trees
View GitHub Profile
@pcan
pcan / README.md
Last active October 17, 2024 05:56
Node.js plain TLS Client & Server, 2-way Cert Auth

Node.js TLS plain TLS sockets

This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.

Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.

Prepare certificates

Generate a Certificate Authority:

@lorenzodallavecchia
lorenzodallavecchia / bluebird-zone.js
Last active February 15, 2017 21:51
Patch for making the Bluebird library aware of Zone.js
/*
* Based on Bluebird 3.4.1
*/
(function() {
var Promise = window.Promise;
var promiseProto = Promise.prototype;
if (typeof Promise.mapSeries !== "function") {
return; // Bluebird not loaded
}
@matthewford
matthewford / circle.yml
Created April 14, 2016 00:31
CircleCI Config for auto deploying to convox
dependencies:
post:
- curl -Ls https://install.convox.com/linux.zip > convox.zip
- sudo unzip convox.zip -d /usr/local/bin
deployment:
staging:
branch: master
commands:
- convox login console.convox.com
- convox switch org/rack
@keighl
keighl / foooont.sh
Last active December 9, 2021 14:00
Rename a font to have the same Family/Fullname/Postscript name. This prevents IE from choking in @font-face
# FontForge command
fontforge -script 2ttf.pe ProprietaryFontCondensedBold.otf
# 2ttf.pe
# FontForge Script
# http://fontforge.org/scripting.html
#
# * Opens the font file
# * Sets the family/fullname/postscript name be the same as the filename (without ext)
@jvandyke
jvandyke / .gitconfig
Last active January 27, 2023 08:11
Use PHPStorm/WebStorm for git diff and merge tools
# ~/.gitconfig
# Add this to your global git configuration file
# Change phpstorm to webstorm, if you use that.
# Diff and merge tool changes
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...`
[merge]
tool = phpstorm
[diff]
tool = phpstorm
@jswanner
jswanner / nulls_last.rb
Created September 13, 2012 20:03
ActiveRecord Postgres Nulls Last
ActiveSupport.on_load(:active_record) do
module Arel::NullsLastPredications
def nulls_last
Arel::Nodes::NullsLast.new self
end
end
module Arel::Nodes
class NullsLast < Unary
def gsub *args
@kayahr
kayahr / ttc2ttf.py
Created April 24, 2012 13:33
Python script to convert a true type font collection into separate ttf files. Copy from http://pastebin.com/QXcAtP24
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#First released as C++ program by Hiroyuki Tsutsumi as part of the free software suite “Beer”
#I thought porting it to Python could be both a challenge and useful
from sys import argv, exit, getsizeof
from struct import pack_into, unpack_from
def ceil4(n):
@ajmaradiaga
ajmaradiaga / BluetoothRestart
Created April 27, 2011 00:16
Force Bluetooth Restart on Mac
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist