Skip to content

Instantly share code, notes, and snippets.

@rafpro
rafpro / frp.md
Created February 16, 2016 10:25 — forked from ohanhi/frp.md
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Foreword

@rafpro
rafpro / gh-like.css
Created September 22, 2016 19:21 — forked from somebox/gh-like.css
github markdown css+script with syntax highlighting. Works with http://markedapp.com
/*
Some simple Github-like styles, with syntax highlighting CSS via Pygments.
*/
body{
font-family: helvetica, arial, freesans, clean, sans-serif;
color: #333;
background-color: #fff;
border: none;
line-height: 1.5;
margin: 2em 3em;
@rafpro
rafpro / add-metabox-to-genesis-cpt-archive-settings.php
Created December 14, 2016 21:14 — forked from joshuadavidnelson/add-metabox-to-genesis-cpt-archive-settings.php
Adding Metaboxes to Genesis CPT Archive Settings, walkthrough publishing August 7th at https://joshuadnelson.com/blog
<?php
/**
* Add custom metabox to Genesis CPT Archive Settings.
*
* @author Joshua David Nelson, josh@joshuadnelson.com
*
* @link https://joshuadnelson.com/adding-metaboxes-to-genesis-cpt-archive-settings
*/
class JDN_Genesis_CPT_Archive_Settings {
@rafpro
rafpro / provisioner-php5.5.sh
Created December 26, 2016 17:26 — forked from anonymous/provisioner-php5.5.sh
Scotch Box Change PHP Repository
#!/usr/bin/env bash
# Update PHP Repo
sudo rm /etc/apt/sources.list.d/ondrej-php5-5_6-trusty.list
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get -y update
# Remove PHP 5.6
sudo apt-get --remove purge -y php5 php5-cli php5-curl php5-gd php5-intl php5-mcrypt php5-memcached php5-mysqlnd php5-readline php5-sqlite php5-cgi php5-common php5-fpm php5-imagick php5-json php5-memcache php5-mongo php5-pgsql php5-redis php-pear
sudo apt-get -y autoremove
@rafpro
rafpro / CHANGES.md
Created May 27, 2017 03:07 — forked from mwpastore/00README.md
Lightning Fast WordPress: Caddy+Varnish+PHP-FPM

2017/03/17

  • Update Varnish service unit files to play nice with Varnish 5.x.

2017/02/02

  • Add more gzip-able content-types.
  • Add note about alternative to Varnish partitioning.

2017/01/30

@rafpro
rafpro / beanstalkd.service
Created June 3, 2017 20:24 — forked from ifduyue/beanstalkd.service
Install beanstalkd on CentOS 7
[Unit]
Description=Beanstalkd is a simple, fast work queue
[Service]
User=nobody
Restart=always
RestartSec=500ms
ExecStart=/usr/local/bin/beanstalkd -b /var/lib/beanstalkd
LimitNOFILE=10240
@rafpro
rafpro / google-analytics-data-events.js
Created June 12, 2017 22:09 — forked from kevinblake/google-analytics-data-events.js
Fire Google Analytics Events using data attributes for label, action and category fields
var googleDataEvents = {
pageTracker: null,
init: function (document) {
document.find("a[data-ga-label],area[data-ga-label]").click(this.trackLink);
},
trackLink: function (e) {
if (_gaq) {
e.preventDefault();
var l = $(this);
var label = l.attr("data-ga-label");
@rafpro
rafpro / nginx.conf
Created June 13, 2017 13:12 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rafpro
rafpro / wstorm
Created June 25, 2017 19:38 — forked from jmosbech/wstorm
Windows command line shortcut to WebStorm. Clone, add to path, celebrate!
#!/bin/sh
# find newest webstorm install
WS=`find /C/Program\ Files\ \(x86\)/JetBrains/*/bin/webstorm.exe -type f -printf '%T@ %p\n' | sort -r | sed 's/^[^ ]* //' | head -n 1`
# open current dir
DIR=`pwd`
`"$WS" "$DIR"` &
@rafpro
rafpro / android_instructions.md
Created June 26, 2017 17:03 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"