Skip to content

Instantly share code, notes, and snippets.

View jimmiehansson's full-sized avatar
🇸🇪
Breaking things to improve them

Jimmie Hansson jimmiehansson

🇸🇪
Breaking things to improve them
View GitHub Profile
@jimmiehansson
jimmiehansson / WIP.js
Created February 4, 2018 15:10
LogParser
'use strict';
/**
* This notation was generated by templates.
* // -------------------------------------------------
* GLOBAL FILE NOTATIONS
* Project of: Rocketdesk Auth
* Filename: LogParser.js by jimmie
'use strict';
/**
* This notation was generated by templates.
* // -------------------------------------------------
* GLOBAL FILE NOTATIONS
* Project of: Rocketdesk Auth
* Filename: PoolHandler.js by jimmie
class ParserStrategy {
constructor(state) {
this.state = state;
this.context = null;
this.dispatcher = {};
this.states = this.states.bind(this);
@jimmiehansson
jimmiehansson / cloudSettings
Last active October 7, 2018 10:31
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-10-07T10:31:28.620Z","extensionVersion":"v3.1.2"}
function createFullPage(options, url, userAgent, props = {}) {
return new Promise((resolve, reject) => {
let entry = null;
// try {
entry = Object.assign(createEntry(options), props); // make this a promise with a then
// }
// catch(error) {
// entry = Object.assign({}, ERROR_ENTRY);
// console.log(error);
@jimmiehansson
jimmiehansson / ultimate-ut-cheat-sheet.md
Created September 14, 2017 13:15 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@jimmiehansson
jimmiehansson / Install_tmux
Created August 31, 2017 07:53 — forked from simme/Install_tmux
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@jimmiehansson
jimmiehansson / jira-behing-nginx-ssl
Created July 6, 2017 17:01 — forked from jtbonhomme/jira-behing-nginx-ssl
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@jimmiehansson
jimmiehansson / sysctl.conf
Created June 27, 2017 16:38 — forked from kfox/sysctl.conf
Linux kernel tuning settings for large number of concurrent clients
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
@jimmiehansson
jimmiehansson / install-comodo-ssl-cert-for-nginx.rst
Created June 22, 2017 21:32 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert