Skip to content

Instantly share code, notes, and snippets.

R3TSU / gist:2f4acec67a09afc2bf06c4350d545c3b
Created Aug 30, 2018 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View gist:2f4acec67a09afc2bf06c4350d545c3b
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
Created May 16, 2018 — forked from chluehr/
Bash: Loop over dates
now=`date +"%Y-%m-%d" -d "05/06/2012"`
end=`date +"%Y-%m-%d" -d "05/23/2012"`
while [ "$now" != "$end" ] ;
now=`date +"%Y-%m-%d" -d "$now + 1 day"`;
echo $now
R3TSU / Gulpfile
Created Aug 31, 2017 — forked from davidnknight/Gulpfile
A well structured gulpfile that performs CSS, JS, image and PHP tasks with an abstract config.
View Gulpfile
Specifically, this gruntfile will perform the following.
- CSS:
-- Compile SCSS
-- Add vendor prefixes for the last 10 browser versions
- JS:
-- Run scripts through jshint to detect errors and potential problems in code.
-- Compile scripts to your destination folder in their original state. Use these in development environments as they'll be easier to debug with as their code doesn't exist on 1 line, nor is it obfuscated.
-- Minify and concatenate scripts into one all.min.js. Uglify will also obfuscate code if you set mangle to true, leave as false if using AngularJS.
Created Jun 22, 2017 — forked from oodavid/
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
Created Apr 12, 2017 — forked from r-sal/
PHPExcel Notes and code snippets


Creating a new PHPExcel Object.

    $this->PHPExcel = new PHPExcel();

Working with sheets

Creating a new sheet:

R3TSU / nss.c
Created Nov 21, 2016
Cipher list constant
View nss.c
static const cipher_s cipherlist[] = {
/* SSL2 cipher suites */
{"rc4", SSL_EN_RC4_128_WITH_MD5},
{"rc4-md5", SSL_EN_RC4_128_WITH_MD5},
{"rc4export", SSL_EN_RC4_128_EXPORT40_WITH_MD5},
{"rc2", SSL_EN_RC2_128_CBC_WITH_MD5},
{"rc2export", SSL_EN_RC2_128_CBC_EXPORT40_WITH_MD5},
R3TSU / nginx.conf
Last active Sep 3, 2015 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
R3TSU / dabblet.css
Created Feb 18, 2014
Pass Container
View dabblet.css
* Pass Container
/*background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;*/
* {
box-sizing: border-box;
R3TSU / dabblet.css
Created Jan 25, 2014
The first commented line is your dabblet’s title
View dabblet.css
* The first commented line is your dabblet’s title
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
font-size: 0;
letter-spacing: -1;