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
#!/bin/bash | |
for target in "platforms;android-23" \ | |
"platforms;android-25" \ | |
"build-tools;25.0.3" \ | |
"build-tools;23.0.1" \ | |
"extras;google;m2repository" \ | |
"extras;android;m2repository" \ | |
"extras;google;google_play_services"; do | |
echo "Update/install: " $target |
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
const flatten = arr => arr.reduce((a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), []); |
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
ln -s $(find . -type d -maxdepth 1 | tail -n1) latest |
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
// minified | |
a=>a.toUpperCase().split('').reduce((b,c)=>b*26+c.charCodeAt(0)-"A".charCodeAt(0)-1,0) | |
// one-lined | |
column => column.toUpperCase().split('').reduce((acc,val) => acc * 26 + val.charCodeAt(0) - "A".charCodeAt(0) - 1,0); | |
// expanded | |
function convert_column_to_index(column_name) { | |
return column_name.split('').reduce(function(acc,val) { | |
return acc * 26 + val.charCodeAt(0) - ("A".charCodeAt(0) - 1) |
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
for FILE in *; do flac -8 $FILE; done; | |
for FILE in *; do echo "$FILE" >> "${PWD##*/}".m3u; 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
find ~/.gradle -type f -name "*.lock" | while read f; do rm $f; 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
#!/usr/bin/env ruby | |
require 'spaceship' | |
Spaceship.login('[email protected]') | |
Spaceship.select_team | |
Spaceship.certificate.all.each do |cert| | |
cert_type = Spaceship::Portal::Certificate::CERTIFICATE_TYPE_IDS[cert.type_display_id].to_s.split("::")[-1] | |
puts "Cert id: #{cert.id}, name: #{cert.name}, expires: #{cert.expires.strftime("%Y-%m-%d")}, type: #{cert_type}" |
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
.banner | |
.banner_container | |
img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/159363/banner-product.png") | |
div | |
h1 Make This Your<br><span>BEST YEAR</span> | |
h2 NutraMetrix Prime Astaxanthin | |
button Learn More | |
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
# couchbase on docker | |
- install docker toolbox - `brew cask install dockertoolbox` | |
- create default vm - `docker-machine create --driver virtualbox default` | |
- get machines defaults - `docker-machine env default` | |
- save defaults to shell - `eval "$(docker-machine env default)"` | |
- install and run docker container - `docker run -d -p 8091:8091 --name cb couchbase:community` | |
- go to http://192.168.99.100:8091 |
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
cordova plugins | cut -d ' ' -f1 | xargs cordova plugin rm |