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
var specials = '!@#$%^&*()_+{}:"<>?\|[];\',./`~'; | |
var lowercase = 'abcdefghijklmnopqrstuvwxyz'; | |
var uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
var numbers = '0123456789'; | |
var all = specials + lowercase + uppercase + numbers; | |
String.prototype.pick = function(min, max) { | |
var n, chars = ''; |
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
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'json' | |
# SET THIS TO YOUR LOCATION (an easy way is to go to maps.google.com and click the map and copy | |
# paste from the new URL) | |
MY_LATLNG = [ YOUR_LAT, YOUR_LONG ] | |
# GET A FREE API KEY FROM ipstack.com | |
IPSTACK_API_KEY = 'YOUR_IPSTACK_API_KEY' |
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 { writeFile } from 'fs'; | |
import { argv } from 'yargs'; | |
// This is good for local dev environments, when it's better to | |
// store a projects environment variables in a .gitignore'd file | |
require('dotenv').config(); | |
// Would be passed to script like this: | |
// `ts-node set-env.ts --environment=dev` | |
// we get it from yargs's argv object |
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
export const environment = { | |
production: true | |
}; |
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
// The file contents for the current environment will overwrite these during build. | |
// The build system defaults to the dev environment which uses `environment.ts`, but if you do | |
// `ng build --env=prod` then `environment.prod.ts` will be used instead. | |
// The list of which env maps to which file can be found in `.angular-cli.json`. | |
export const environment = { | |
production: false | |
}; |
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
# SETUP | |
# assumes macOS and Homebrew are installed | |
# Get Python 3 | |
brew install python3 | |
# Get pip (pip3 for Python 3) | |
curl -O https://bootstrap.pypa.io/get-pip.py | |
# Use pip3 to get the awscli package | |
pip3 install --user --upgrade awscli | |
# I had to add the following line to my dotfiles (i.e. my .bash_profile) to add it to my $PATH: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder