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
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| func worker(wg *sync.WaitGroup, requestChannel <-chan string, responseChannel chan<- int, id int) { | |
| defer wg.Done() |
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
| # If you come from bash you might have to change your $PATH. | |
| export PATH=/opt/local/bin:$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH="/Users/jdesilvio/.oh-my-zsh" | |
| # Theme | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
| ZSH_THEME="spaceship" | |
| SPACESHIP_CHAR_SYMBOL="λ " |
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
| find ./src/**/*.py -type f -exec sed -i -e 's/<FIND>/<REPLACE>/g' {} \; | |
| rm ./**/*-e |
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
| # Intel | |
| export CFLAGS="-I$(brew --prefix openssl)/include" | |
| export LDFLAGS="-L$(brew --prefix openssl)/lib" | |
| export PYCURL_SSL_LIBRARY=openssl | |
| pip uninstall pycurl | |
| pip install pycurl==7.43.0.2 --global-option="--with-openssl" | |
| # M1 | |
| brew update && brew install openssl |
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
| groups = Group.objects.all() | |
| for group in groups: | |
| for perm in group.permissions.all(): | |
| self.logger.info("%s|%s|%s", group.name, perm.name, perm.codename) |
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
| export ORACLE_HOME=/opt/instantclient_12_2/ | |
| export LD_RUN_PATH=/opt/instantclient_12_2:$LD_RUN_PATH |
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
| from logging import Logger | |
| import unittest | |
| from mock import Mock, patch | |
| class MyClassTest(unittest.TestCase): | |
| def setUp(self): | |
| self._logger = Mock(spec=Logger) | |
| self.logging_patch = patch( |
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
| set -g default-terminal "screen-256color" | |
| set-option -sa terminal-overrides ',*256col*:RGB' | |
| # remap prefix from 'C-b' to 'C-a' | |
| unbind C-b | |
| set-option -g prefix C-a | |
| bind-key C-a send-prefix | |
| # force a reload of the config file | |
| unbind r |
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
| # Added by Anaconda2 2.4.0 installer | |
| #export PATH="$HOME/anaconda/bin:$PATH" | |
| # Alias | |
| alias activate="source ./env/bin/activate" | |
| alias tree1="tree -L 1" | |
| alias tree2="tree -L 2" | |
| alias tree3="tree -L 3" |
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
| export PYTHONPATH="${PYTHONPATH}:/usr/local/bin/python" | |
| export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting | |
| export NVM_DIR="/Users/JohnsMacBook/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm |
NewerOlder