Skip to content

Instantly share code, notes, and snippets.

@tyaakow
tyaakow / cloudSettings
Last active July 12, 2019 17:00
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-07-12T17:00:27.247Z","extensionVersion":"v3.3.1"}
version: '3.1'
services:
db:
image: mysql:5.7
volumes:
- D:\repo\work\dockers\wp\db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
@tyaakow
tyaakow / deploy.rb
Last active October 17, 2018 01:41
# This file and guide does not consist of the perfect practices, or most complete
# set of procedures, but it showcases things we can do with mina, and introduces
# the audience to the subject. Starting from here, readers will build much more complete
# and polished scripts. Sometimes we need reusable, quick shortcuts that will make
# developer's lives easier - hopefully this is one of those tips.
require 'mina/rails'
require 'mina/git'
set :term_mode, nil
@tyaakow
tyaakow / rc.local
Created August 24, 2018 06:37
/etc/rc.local for uwsgi django app
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@tyaakow
tyaakow / deploy.rb
Last active August 24, 2018 15:05
deploy script for mina
require 'mina/rails'
require 'mina/git'
set :application_name, 'minaguide'
set :domain, ENV['domain']
set :deploy_to, '/root/project/minaguide'
set :repository, 'https://github.com/tyaakow/django-uwsgi-starter.git'
set :branch, 'master'
set :user, 'root'
@tyaakow
tyaakow / myxydomain.conf
Last active August 24, 2018 06:25
NGINX virtualhost configuration file for Django & uWSGI setup
# the upstream component nginx needs to connect to
upstream django {
server unix:///tmp/minaguide.sock;
}
# configuration of the server
server {
# the port your site will be served on
listen 80;
# the domain name it will serve for
@tyaakow
tyaakow / 00README.md
Created December 24, 2017 00:41 — forked from mwpastore/00README.md
Lightning Fast WordPress: Caddy+Varnish+PHP-FPM

README

This gist assumes you are migrating an existing site for www.example.com — ideally WordPress — to a new server — ideally Ubuntu Server 16.04 LTS — and wish to enable HTTP/2 (backwards compatibile with HTTP/1.1) with always-on HTTPS, caching, compression, and more. Although these instructions are geared towards WordPress, they should be trivially extensible to other PHP frameworks, other FastCGI backends, and even non-FastCGI backends (using proxy in lieu of fastcgi in the terminal Caddyfile stanza).

Quickstart: Use your own naked and canonical domain names instead of example.com and www.example.com and customize the Caddyfile and VCL provided in this gist to your preferences!

These instructions target Varnish Cache 4.1, PHP-FPM 7.0, and Caddy 0.10. (I'm using MariaDB 10.1 as well, but that's not relevant to this guide.)

@tyaakow
tyaakow / gulpfile.js
Created June 10, 2017 00:39 — forked from itzikbenh/gulpfile.js
gulp-webpack
var gulp = require('gulp');
var sass = require('gulp-sass');
var watch = require('gulp-watch');
var browserSync = require('browser-sync');
var csso = require('gulp-csso');
var uglify = require('gulp-uglify');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer');
var postcssAnt = require('postcss-ant');
var webpack = require('webpack');
@tyaakow
tyaakow / 0-startup-overview.md
Created March 15, 2017 22:11 — forked from dideler/0-startup-overview.md
Startup Engineering notes
@tyaakow
tyaakow / jquery.js
Created November 22, 2016 11:20 — forked from anonymous/jquery.js
Infected jquery
/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:func