Skip to content

Instantly share code, notes, and snippets.

View Hendrikv1990's full-sized avatar
💭
I may be slow to respond.

Hendrik Vlaanderen Hendrikv1990

💭
I may be slow to respond.
View GitHub Profile
@Hendrikv1990
Hendrikv1990 / gulpfile.js
Created March 29, 2018 13:53 — forked from atelic/gulpfile.js
Basic gulpfile for minify and concat css and javascript
/*
Before using make sure you have:
npm install --save-dev gulp gulp-minify-css gulp-concat gulp-uglify gulp-autoprefixer gulp-sass
Make sure to change the directory names in the default watch function to the CSS/SCSS/SASS directories you are using so it reloads
*/
var gulp = require('gulp'),
minifyCSS = require('gulp-minify-css'),
concat = require('gulp-concat')
@Hendrikv1990
Hendrikv1990 / AWS_Single_LetsEncrypt.yaml
Created January 5, 2018 16:10
AWS Elastic Beanstalk .ebextensions config for single instance free SSL using letsencrypt certbot and nginx. http://bluefletch.com/blog/domain-agnostic-letsencrypt-ssl-config-for-elastic-beanstalk-single-instances/
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too.
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready!
files:
# The Nginx config forces https, and is meant as an example only.
/etc/nginx/conf.d/000_http_redirect_custom.conf:
mode: "000644"
owner: root
group: root
@Hendrikv1990
Hendrikv1990 / wp.sh
Created July 26, 2016 13:32 — forked from phlbnks/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Do you need to setup new MySQL database? (y/n)"
read -e setupmysql
if [ "$setupmysql" == y ] ; then
echo "MySQL Admin User: "
read -e mysqluser
@Hendrikv1990
Hendrikv1990 / wp.sh
Created November 22, 2015 12:43 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@Hendrikv1990
Hendrikv1990 / server_configuration.sh
Created November 17, 2015 16:30 — forked from marinoszak/server_configuration.sh
ubuntu 14.04, passenger, apache, rails
#!/bin/bash
# ================================================================== #
# Ubuntu 14.04 web server build shell script
# ================================================================== #
#
# ================================================================== #
#
#
#
# ================================================================== #
require 'csv'
require 'httparty'
require 'json'
header = File.open('input.tsv', &:readline) # get header from input file
header = header.to_s.gsub("\n","") # remove newline characters
header << "\t\t\tlatitude\t\t\tlongitude\n" # format header
File.open("output.tsv", 'w') {|file| file.write(header) } # create output file and append header
base_url = "http://maps.googleapis.com/maps/api/geocode/json?address="