Skip to content

Instantly share code, notes, and snippets.

View milose's full-sized avatar

Miloš Šaković milose

View GitHub Profile
@milose
milose / mac - dns flush
Created September 24, 2015 01:49
Mac OSX flush DNS cache
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed
Cool:
sudo apt-get install byobu
byobu-enable
~relogin
f9 to configure labels
Simple:
Memory:
sudo apt-get install htop
htop
@milose
milose / gulpfile.js
Last active January 23, 2017 19:32
Laravel Elixir boilerplate for Foundation 6
var elixir = require('laravel-elixir'),
env = require('dotenv').load();
var path = {
node: 'node_modules/',
foundation: 'foundation-sites/',
motionui: 'motion-ui/',
};
elixir.config.sourcemaps = process.env.APP_DEBUG;
@milose
milose / blog.md
Last active December 13, 2017 17:39
This is my first blog post.

#Woo hoo.

This was really easy to do.

What if I enter another paragraph?

And another?

And another one?

@milose
milose / bash_it.md
Last active October 20, 2016 02:50
Installing and syncing bash_it between multiple computers

bash_it-settings

Custom themes (with bash_it) and aliases for development and vm boxes. To sync aliases just run bsync after installing.

Install bash_it

Clone the repository to get it:

git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
~/.bash_it/install.sh
@milose
milose / linux-sound.md
Last active December 15, 2015 05:45
Sound settings on debian

Mixer

sudo  alsamixer

Sound settings

sudo nano /etc/asound.conf
@milose
milose / array-filters.js
Last active December 16, 2015 18:15
orderByCi case insensitive order by for vue.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 / gulpfile.js
Last active December 17, 2015 04:57
Laravel gulpfile.js with Foundation
// 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 / create-users-mysql.md
Last active December 3, 2016 17:02
MySQL user queries

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 / forever.md
Last active January 17, 2023 06:36
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.

[