Skip to content

Instantly share code, notes, and snippets.

View mauricerenck's full-sized avatar

Maurice Renck mauricerenck

View GitHub Profile
@mauricerenck
mauricerenck / [sh] git-bash-prompt
Last active August 29, 2015 14:02
[sh] show current branch in bash-prompt
#!/bin/bash
## git bash-prompt
GIT_THEME_PROMPT_DIRTY='*'
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo -e "(${ref#refs/heads/}$(parse_git_dirty))"
}
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
%border-box {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
@mauricerenck
mauricerenck / gist:f0979492a9804dc7ea98
Created August 18, 2014 08:12
[PHP] Disable Wordpress autoupdate
//in wp-config.php set
define( 'AUTOMATIC_UPDATER_DISABLED', true );
## DEFAULT
set $no_cache 0;
## RULES
if ( $request_uri ~ "/wp-" ) {
set $no_cache 1;
}
if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) {
set $no_cache 1;
@mauricerenck
mauricerenck / jsonval.sh
Last active August 29, 2015 14:06 — forked from cjus/jsonval.sh
#!/bin/bash
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echo ${temp##*|}
}
json=`curl -s -X GET http://twitter.com/users/show/$1.json`
prop='profile_image_url'
picurl=`jsonval`
@mauricerenck
mauricerenck / npm-file-limit
Created November 14, 2014 09:16
Set max open files up for npm
launchctl limit maxfiles 16384 16384 && ulimit -n 16384
@mauricerenck
mauricerenck / [scss] font pixel rem setup
Created January 3, 2015 19:08
[scss] font pixel rem setup
@mixin font-size($sizeValue: 16) {
font-size: $sizeValue + px;
font-size: ($sizeValue / 10 ) + rem;
}
html {
font-size: 62.5%;
}
body {
#!/bin/bash
## Install ISPConfig3 on Ubuntu 14.04 64Bits
## Author: Nilton OS blog.linuxpro.com.br
## http://blog.linuxpro.com.br/posts/instalando-ispconfig3-no-ubuntu-1404.html
## http://www.howtoforge.com/the-perfect-server-ubuntu-14.04-nginx-bind-mysql-php-postfix-dovecot-and-ispconfig3-p2
dpkg-reconfigure dash
service apparmor stop
/* background : linear-gradient(to right, white 30px, transparent 0);
background-position : bottom left;
background-size : 60px 2px;
background-repeat : repeat-x; */