Skip to content

Instantly share code, notes, and snippets.

View js-30-start-up-tools.md

Javascript30 Start-up Tools

Install Atom editor

Download

Install XCode Command Tools

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

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.

mod_expires

http://httpd.apache.org/docs/2.2/mod/mod_expires.html

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
milose / ESP8266.md
Last active Feb 19, 2016
ESP8266 notes
View ESP8266.md

ESP8266-01 Pinout

ESP8266-01 Pinout

Programming (firmware upload) hookup

ESP8266-01

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

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
milose / create-users-mysql.md
Last active Dec 3, 2016
MySQL user queries
View create-users-mysql.md

Quick snippets

User info

Show all users and hosts

SELECT User, Host FROM mysql.user;

Show grants for logged in user

SHOW GRANTS;
@milose
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
require('laravel-elixir-vueify');
// paths
var path = {
node: 'node_modules/',
@milose
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 = arr.map(function (item) {
return item.toUppercase();
});
return orderBy(arr, sortKey, reverse);
@milose
milose / linux-sound.md
Last active Dec 15, 2015
Sound settings on debian
View linux-sound.md

Mixer

sudo  alsamixer

Sound settings

sudo nano /etc/asound.conf