Anything with a $
denotes a paid resource
- elixir-lang.org: Getting Started Guide
- $ Book: Elixir in Action (Medium-Advanced Difficulty)
- $ Book: Programming Elixir (Beginner-Medium Difficulty)
- $ Udemy Course: Elixir for Beginners
Anything with a $
denotes a paid resource
So one of the painful points of using docker
on OS X is that you need to run a virtualbox VM, which often suffers from performance issues. With xhyve, a OS X virtualization system, and docker-machine-xhyve you can now have docker
use the native OS X hypervisor to run containers.
No more dealing with virtualbox shenanigans!
In this script, I've also set up a way to autoconfigure terminal sessions to load docker's environment vars (dependent on docker-machine
) so you do not have to run eval $(docker-machine env whatever)
every time you open a new terminal window.
#!/usr/bin/env python3 | |
import sys | |
import os | |
def curl_to_ab(curl_cmd: list, num: int=200, cur: int=4) -> str: | |
""" | |
Translate a cURL command created by Chrome's developer tools into a | |
command for ``ab``, the ApacheBench HTTP benchmarking tool. |
Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
case "$(sw_vers -productVersion)" in | |
10.5.*|10.6.*) | |
alias flush_dns="sudo dscacheutil -flushcache" | |
;; | |
10.8.*|10.7.*) | |
alias flush_dns="sudo killall -HUP mDNSResponder" | |
;; | |
10.9.*) | |
alias flush_dns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" | |
;; |
################## | |
# Privacy Settings | |
################## | |
# Privacy: Let apps use my advertising ID: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
# To Restore: | |
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 | |
# Privacy: SmartScreen Filter for Store Apps: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0 |
This is pretty simple snippet to get API Token of a user , lets say "MYUser" in jenkins.
its pretty useful when you are working with 'jenkins-job-builder' to update jobs in jenkins,
and you need to get the api token which JJB needs inorder to update jobs to ..
run this code in either jenkins script console , or as i prefer, in form of init.groovy.
so when jenkins master starts, i create a user for JJb.
after that i get the token right away and pass it to my JJB jobs folder to file 'jenkins_jobs.ini' :)_ .
///////////////////////////////////////////////////////////////////////
git log --name-only | grep php --exclude=trunk | sort | uniq -c | sort -nr | head -n 25 > churn.txt | |
This one looks like an odd ball but what it does is: | |
- looks at the git log file, retrieving just the filenames; | |
- greps to extract those filenames, excluding anything from the old SVN /trunk structure; | |
- sorts the list of files to get the duplicates together; | |
- eliminates the duplicates but keeps a count of them; | |
- resorts the file names by that count; and |