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
import React, { Component } from 'react';
import { Link } from 'react-router';
class Main extends Component {
render() {
return(
<div>
<nav className="nav-group">
/**
* This notation was generated by templates.
* // -------------------------------------------------
* GLOBAL FILE NOTATIONS
* Project of: fix
* Filename: home.component.jsx by jimmie
* Created: 2017-03-09 @ 14:04
* Product of: WebStorm
* // -------------------------------------------------
* Make sure this file is part of its proper namespace
@jimmiehansson
jimmiehansson / entry.jsx
Created May 1, 2017 20:48
Entry file for router
"use strict";
/**
* This notation was generated by templates.
* // -------------------------------------------------
* GLOBAL FILE NOTATIONS
* Project of: fix
* Filename: entry.js by jimmie
* Created: 2017-03-01 @ 20:53
* Product of: Diskovery
@jimmiehansson
jimmiehansson / main.js
Created May 1, 2017 20:49
Electron app wrapper, initial browser instance and object.
"use strict";
/**
* This notation was generated by templates.
* // -------------------------------------------------
* GLOBAL FILE NOTATIONS
* Project of: fix
* Filename: main.js by jimmie
* Created: 2017-02-28 @ 21:09
* Product of: Diskovery
@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

@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 / 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 / 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 / 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


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);