Skip to content

Instantly share code, notes, and snippets.


Javascript30 Start-up Tools

Install Atom editor


Install XCode Command Tools

xcode-select --install
milose /
Last active Mar 24, 2016
Leverage Browser Caching for Static Files with .htaccess

This is what I use to control headers/caching, I'm not an Apache pro, so let me know if there is room for improvement, but I know that this has been working well on all of my sites for some time now.


This module controls the setting of the Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses. The expiration date can set to be relative to either the time the source file was last modified, or to the time of the client access.

These HTTP headers are an instruction to the client about the document's validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source.

# BEGIN Expires
milose /
Last active Feb 19, 2016
ESP8266 notes

ESP8266-01 Pinout

ESP8266-01 Pinout

Programming (firmware upload) hookup


  • VCC -> Power supply VCC (3V3!)
  • CH_PD -> Power supply VCC (3V3!)
  • GND -> Common GND
  • GPIO_00 -> Common GND
milose / gistlog.yml
Last active Feb 19, 2016
Persisting MySQL data with Homestead destroy
View gistlog.yml
published: false
milose /
Last active Mar 26, 2019
Making your node apps run on startup and forever

Hello forever

Forever is a simple CLI tool for ensuring that a given script runs continuously (i.e. forever). Install it globally using NPM:

$ [sudo] npm install forever -g

Create a forever.json for your apps

This file should contain settings for all of your apps you want to run at boot. I use /var/www/nodes to store my node apps and I put my forever.json to /var/www/nodes/forever.json.

milose /
Last active Dec 3, 2016
MySQL user queries

Quick snippets

User info

Show all users and hosts

SELECT User, Host FROM mysql.user;

Show grants for logged in user

milose / gulpfile.js
Last active Dec 17, 2015
Laravel gulpfile.js with Foundation
View gulpfile.js
// load elixir and .env reader
var elixir = require('laravel-elixir'),
env = require('dotenv').load();
// plug-ins
// paths
var path = {
node: 'node_modules/',
milose / array-filters.js
Last active Dec 16, 2015
orderByCi case insensitive order by for vue.js
View array-filters.js
export function orderByCi (arr, sortKey, reverse) {
arr = convertArray(arr)
if (!sortKey) {
return arr
arr = (item) {
return item.toUppercase();
return orderBy(arr, sortKey, reverse);
milose /
Last active Dec 15, 2015
Sound settings on debian


sudo  alsamixer

Sound settings

sudo nano /etc/asound.conf