Skip to content

Instantly share code, notes, and snippets.

View doole's full-sized avatar

Dušan Živojnov doole

View GitHub Profile
@doole
doole / _etc_resolv.conf
Last active January 23, 2024 10:52
Nameservers
# SBB
nameserver 89.216.1.30
nameserver 89.216.1.50
# Google
nameserver 8.8.8.8
nameserver 8.8.4.4
# OpenDNS
nameserver 208.67.222.222
@doole
doole / downloads_cleanup.sh
Created November 17, 2014 08:25
SELECT/DELETE sqlite3 database records for all downloads on Mac OS X
# Source
# http://www.macgasm.net/2013/01/18/good-morning-your-mac-keeps-a-log-of-all-your-downloads/
# http://lifehacker.com/your-mac-logs-everything-you-download-heres-how-to-cle-1658394180
# SELECT
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent'
# DELETE
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'
@doole
doole / bash_fix.sh
Last active August 29, 2015 14:06
Mac OS X fix for Bash bug
#
# Source
# http://apple.stackexchange.com/questions/146849/how-do-i-recompile-bash-to-avoid-the-remote-exploit-cve-2014-6271/146851#146851
#
# Test for vulnerablity
# $ env x='() { :;}; echo vulnerable' bash -c 'echo hello'
# If you want to disable auto-imported functions, uncomment the following
# export ADD_IMPORT_FUNCTIONS_PATCH=YES
@doole
doole / ruby_centos6.sh
Last active April 13, 2017 21:19
Ruby/Rails setup on CentOS 6.x with Vagrant
#!/bin/bash
# Vagrant CentOS6 boxes
# CentOS 6.4 x64 https://github.com/2creatives/vagrant-centos/releases/download/v6.4.2/centos64-x86_64-20140116.box
# CentOS 6.5 x64 https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box
# Update
sudo yum -y update
# Add Development tools
@doole
doole / pelican_on_arch.sh
Last active August 29, 2015 14:06
Pelican installation on Arch Linux
#!/bin/sh
####
# Documentation
# http://docs.getpelican.com/en/3.4.0/importer.html#import
# https://wiki.archlinux.org/index.php/Haskell#Haskell_platform
####
# =Setup
pyvenv ./env
@doole
doole / mpv.conf
Last active June 3, 2024 04:49
Configuration file for `mpv`
#
# mpv configuration file
#
# See the CONFIGURATION FILES section in the man page
# for a detailed description of the syntax.
#
# Profiles should be placed at the bottom of the configuration file to ensure
# that settings wanted as defaults are not restricted to specific profiles.
#
# Note that the commented example options usually do _not_ set the default
@doole
doole / upgrade_postgres_92_93_debian.sh
Created March 19, 2014 10:17
Upgrade PostgreSQL 9.2 to 9.3 of Debian Wheezy
#!/bin/bash
# Update and upgrade packages
sudo apt-get update && sudo apt-get upgrade
# Install postgres 9.3
sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3
# Having Postgres 9.2 already, this will create database instance configured to run on port 5433
@doole
doole / global_modules.txt
Last active August 29, 2015 13:57
Node.js and npm installation on Mac OS X Mavericks/Yosemite.
bower
coffeelint
csslint
grunt
gulp
jshint
npm
uglify-js
@doole
doole / .vimrc
Last active August 31, 2022 10:17
Minimal .vimrc for server setup
"
" Minimal .vimrc for server setup
"
set nocompatible
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set showmatch
set vb t_vb=
#! /bin/bash
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn web server
# Description: starts unicorn