Skip to content

Instantly share code, notes, and snippets.

View mauricerenck's full-sized avatar

Maurice Renck mauricerenck

View GitHub Profile
@mauricerenck
mauricerenck / [html] html-template
Last active January 23, 2017 11:16
[html] html5 template
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1">
<title></title>
<link href="assets/css/style.css" rel="stylesheet" media="screen">
</head>
<body>
@mauricerenck
mauricerenck / [sh] wp-version
Last active December 14, 2015 08:09
[sh] get current wordpress-version-number
curl -s http://core.svn.wordpress.org/tags/ | awk -F '">' '{print $2}' | awk -F"/<" '{print $1}' | egrep "^[0-9].[0-9]" | sort -n | tail -n 1
@mauricerenck
mauricerenck / [sh] short URL Google
Last active December 15, 2015 17:59
[sh] short URLs Google
curl https://www.googleapis.com/urlshortener/v1/url -H 'Content-Type: application/json' -d "{\"longUrl\": \"BASEURL/$1\"}" | awk -F=":" -v RS="," '$1~/"id"/ {print}' | sed -e 's/"id": "//g' | sed -e 's/"//g'
@mauricerenck
mauricerenck / keybase.md
Last active December 2, 2018 16:06
keybase.md

Keybase proof

I hereby claim:

  • I am mauricerenck on github.
  • I am mauricerenck (https://keybase.io/mauricerenck) on keybase.
  • I have a public key whose fingerprint is AD05 6F75 6CD7 4C99 B859 D232 C015 8BDF 436F CEF7

To claim this, I am signing this object:

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