This file contains 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
// original from:https://codepen.io/mdd/pen/wGRqbw | |
// Reducer | |
const counter = (state = 0, actions) => { | |
switch (actions.type) { | |
case 'INCREMENT': return state + 1; | |
case 'DECREMENT': return state - 1; | |
default: return state | |
} | |
} |
This file contains 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 | |
// Buffer all upcoming output... | |
ob_start(); | |
// Send your response. | |
echo "Testing response"; | |
// Get the size of the output. | |
$size = ob_get_length(); |
This file contains 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
- login to jenkins box (ssh) | |
- switch user to jenkins "sudo su -s /bin/bash jenkins" | |
- go to jenkins home directory "cd ~" | |
- generate keys (you need separate pair per github private project as the projects are on the same domain) | |
- "ssh-keygen -t rsa -f ~/.ssh/id_rsa_<project>" (replace <project> with your project name) | |
- repeat this for every github project | |
- crate "config" file in .ssh dir - "vim ~/.ssh/config" with the following content: | |
# <project1> | |
Host github.com-<project1> | |
HostName github.com |
This file contains 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
- login to jenkins box (ssh) | |
- switch user to jenkins "sudo su -s /bin/bash jenkins" | |
- go to jenkins home directory "cd ~" | |
- generate keys (you need separate pair per github private project as the projects are on the same domain) | |
- "ssh-keygen -t rsa -f ~/.ssh/id_rsa_<project>" (replace <project> with your project name) | |
- repeat this for every github project | |
- crate "config" file in .ssh dir - "vim ~/.ssh/config" with the following content: | |
# <project1> | |
Host github.com-<project1> | |
HostName github.com |
This file contains 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
ex () | |
{ | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) unrar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xf $1 ;; |
This file contains 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
;========================================================== | |
; | |
; | |
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ | |
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ | |
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ | |
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ | |
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ | |
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ | |
; |
This file contains 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
import setproctitle | |
setproctitle.setproctitle("qutebrowser") | |
# Bindings | |
config.bind("gi", "hint inputs") | |
config.bind("<f12>", "inspector") | |
config.unbind("+") | |
config.unbind("-") | |
config.unbind("=") |