This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def count_queries(&block) | |
p "--------- Start Count SQL -----------" | |
count = 0 | |
counter_f = ->(name, started, finished, unique_id, payload) { | |
unless payload[:name].in? %w[ CACHE SCHEMA ] | |
count += 1 | |
end | |
} | |
ActiveSupport::Notifications.subscribed(counter_f, "sql.active_record", &block) | |
count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"===[ Settings ]======================================================== | |
" Autocomplete using Firefox Awesomebar subsystem | |
set complete=l | |
" Show completions as you type? '' waits for tab, 'auto' shows them immediately | |
set wildoptions='' | |
" Select the longest autocomplete match | |
set wildmode='list:full' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://loicpefferkorn.net/2015/01/arch-linux-on-macbook-pro-retina-2014-with-dm-crypt-lvm-and-suspend-to-disk/ | |
http://codylittlewood.com/setting-up-an-external-monitor-on-macbook-pro-running-arch-linux-and-awesomewm/ | |
http://vincent.jousse.org/en/tech/archlinux-retina-hidpi-macbookpro-xmonad/ | |
http://snakeccnote.blogspot.com/2016/02/hidpi-arch-linux-macbook-pro-awesome-wm.html | |
http://pedronveloso.com/running-arch-linux-on-macbook-13-2015/ | |
https://mchladek.me/post/arch-mbp/ | |
https://vec.io/posts/use-arch-linux-and-xmonad-on-macbook-pro-with-retina-display | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/server add <name> <team>.irc.slack.com/6667 -ssl -password=<password> -ssl_verify=off -nicks=<username> | |
/connect <name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To the extent possible under law, the Yawning Angel has waived all copyright | |
// and related or neighboring rights to orhttp_example, using the creative | |
// commons "cc0" public domain dedication. See LICENSE or | |
// <http://creativecommons.org/publicdomain/zero/1.0/> for full details. | |
package main | |
import ( | |
// Things needed by the actual interface. | |
"golang.org/x/net/proxy" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upstart Configuration | |
description "Golang Web App" | |
start on (net-device-up | |
and local-filesystems | |
and runlevel [2345]) | |
stop on runlevel [016] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
app := NewApplication("development.toml") | |
app.Start(":8080") | |
} | |
type Application struct { | |
Config *tomlConfig | |
PagesController *ControllerInterface | |
PagesStorage *StorageInterface | |
UsersStorage *StorageInterface |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
##If you want to install OpenJDK | |
#sudo apt-get update | |
#sudo apt-get install openjdk-8-jre-headless -y | |
###Or if you want to install Oracle JDK, which seems to have slightly better performance | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq helm-display-header-line nil) ;; t by default | |
(set-face-attribute 'helm-source-header nil :height 0.1) | |
(helm-autoresize-mode 1) | |
(setq helm-autoresize-max-height 30) | |
(setq helm-autoresize-min-height 30) | |
(setq helm-split-window-in-side-p t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Core\Db; | |
/** | |
* Helps to iterate over huge data collection. | |
* It loads records by small chunks | |
* | |
* Example: | |
* <pre> |