Skip to content

Instantly share code, notes, and snippets.

View mamboer's full-sized avatar

Levin Van mamboer

View GitHub Profile
@mamboer
mamboer / git_submodules.md
Created May 25, 2017 10:05 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@mamboer
mamboer / update_gfwlist.sh
Created August 3, 2016 02:00 — forked from VincentSit/update_gfwlist.sh
Automatically update the PAC for ShadowsocksX. Only tested on OS X.
#!/bin/bash
# update_gfwlist.sh
# Author : VincentSit
# Copyright (c) http://xuexuefeng.com
#
# Example usage
#
# ./whatever-you-name-this.sh
#
# Task Scheduling (Optional)
@mamboer
mamboer / gist:83fa802a76363a507ad29a88daf79143
Created July 1, 2016 02:57 — forked from moneytoo/gist:ab3f34e4fddc2110675952f8280f49c5
nginx with OpenSSL 1.0.2 (ALPN) on CentOS 7
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel
OPENSSL="openssl-1.0.2h"
NGINX="nginx-1.11.1-1"
mkdir -p /opt/lib
wget https://www.openssl.org/source/$OPENSSL.tar.gz -O /opt/lib/$OPENSSL.tar.gz
tar -zxvf /opt/lib/$OPENSSL.tar.gz -C /opt/lib
@mamboer
mamboer / install-comodo-ssl-cert-for-nginx.rst
Created June 18, 2016 07:00 — 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

@mamboer
mamboer / gist:e6a3cd0a514f3f795560f3777bfa536a
Created May 25, 2016 04:26 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@mamboer
mamboer / gist:7549d4a28ee223e6d1f2
Created October 31, 2015 04:26 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@mamboer
mamboer / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
(function ($){
var check=false, isRelative=true;
$.elementFromPoint = function(x,y)
{
if(!document.elementFromPoint) return null;
if(!check)
{
var sl;
@mamboer
mamboer / loopback-paginate-scope
Created March 11, 2015 10:01
Loopback enhance, add pagination feature to the related scope object
// scope object pagination method
// reference : strong-remoting/lib/remote-objects.js line 550
// reference : strong-remoting/lib/shared-method.js line 245
define('__paginate__' + scopeName, {
isStatic: isStatic,
http: {verb: 'get', path: '/' + pathName+'/paginate'},
accepts: {arg: 'filter', type: 'object'},
description: 'Pagination Queries ' + scopeName + ' of ' + this.modelName + '.',
accessType: 'READ',
returns: {arg: scopeName, type: [toModelName], root: true}
@mamboer
mamboer / wr2014.css
Created December 10, 2014 11:44
css for webrebuild.org/2014
/*!
Animate.css - http://daneden.me/animate
Licensed under the MIT license - http://opensource.org/licenses/MIT
Copyright (c) 2013 Daniel Eden
*/
.animated,.conf .conf-time,.conf .conf-title .conf-point,.conf .conf-title .conf-text,.conf .conf-title .conf-ver,.intro .slogan .slogan-bg,.intro .slogan .slogan-drops,.intro .slogan .slogan-text,.intro .slogan .slogan-time,.intro .slogan-tips,.talk .talk-title .talk-circle,.talk .talk-title .talk-text span,.topical .topical-content,.topical .topical-title .topical-circle,.topical .topical-title .topical-text {
-webkit-animation-duration:1s;
animation-duration:1s;
-webkit-animation-fill-mode:both;