Skip to content

Instantly share code, notes, and snippets.

View kyuumeitai's full-sized avatar

Álex Acuña Viera kyuumeitai

View GitHub Profile
@kyuumeitai
kyuumeitai / nginx.conf
Created January 12, 2018 15:52 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# Advanced config for NGINX
server_tokens off;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
@kyuumeitai
kyuumeitai / piwik-nginx.conf
Created September 6, 2017 17:31 — forked from xenithorb/piwik-nginx.conf
Piwik flat-file nginx configuration
#-*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" -*-
## Define a zone for limiting the number of simultaneous
## connections nginx accepts. 1m means 32000 simultaneous
## sessions. We need to define for each server the limit_conn
## value refering to this or other zones.
## ** This syntax requires nginx version >=
## ** 1.1.8. Cf. http://nginx.org/en/CHANGES. If using an older
## ** version then use the limit_zone directive below
## ** instead. Comment out this
## ** one if not using nginx version >= 1.1.8.
@kyuumeitai
kyuumeitai / gist:cb0c78794719e4d278a7f3c0bf816c33
Created July 6, 2017 17:00 — forked from davidnunez/gist:1404789
list all installed packages in android adb shell
pm list packages -f
@kyuumeitai
kyuumeitai / package.json
Created March 21, 2017 22:02 — forked from corysimmons/package.json
babel, sass, npm-run-all
{
"devDependencies": {
"babel-cli": "^6.10.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-stage-0": "^6.5.0",
"node-sass": "^3.8.0",
"npm-run-all": "^2.2.2"
},
"babel": {
"presets": [
@kyuumeitai
kyuumeitai / README.md
Last active January 30, 2017 19:31 — forked from lopezjurip/README.md
Write to NTFS on OSX Yosemite and El Capitan

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
@kyuumeitai
kyuumeitai / custom-cf7-tags.php
Created September 9, 2016 18:41 — forked from bainternet/custom-cf7-tags.php
custom contact form 7 tags
<?php
//contact form 7 extras
//author email
wpcf7_add_shortcode('expert_email', 'wpcf7_expert_email_shortcode_handler', true);
function wpcf7_expert_email_shortcode_handler($tag) {
if (!is_array($tag)) return '';
$name = $tag['name'];
if (empty($name)) return '';
// Read full blogpost explaining this at http://labs.lillyapps.no/2014/04/12/handle-timezones-parse-com
var moment = require('cloud/moment-timezone.js');
moment.tz.add(require('cloud/moment-timezone-data.js'));
Parse.Cloud.define("momentTest", function (request, response)
{
var osloSummerTime = moment.tz('2014-04-12 11:55', 'Europe/Oslo');
var osloWinterTime = moment.tz('2013-11-18 11:55', 'Europe/Oslo');
say -v Fred "Fitter, happier, more productive,\
comfortable,\
not drinking too much,\
regular exercise at the gym\
(3 days a week),\
getting on better with your associate employee contemporaries,\
at ease,\
eating well\
(no more microwave dinners and saturated fats),\
a patient better driver,\
# Install Homebrew
# http://mxcl.github.io/homebrew/
# Install system dependencies
brew install rtmpdump git
# Install perl dependencies
sudo perl -MCPAN -e 'install YAML::Base'
sudo perl -MCPAN -e 'install Crypt::Rijndael'
sudo perl -MCPAN -e 'install WWW::Mechanize'

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname