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 bash | |
# | |
# Date: 04 2015 | |
# Author: dataday | |
# | |
# Support: | |
# Mac OS 10.6+, or anything with Mac's 'networksetup' tools installed. | |
# Bash 3.2.48(1)-release | |
# | |
# Links: |
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 bash | |
# | |
# author: dataday | |
# created: 23/02/2016 | |
# | |
# Description: | |
# Creates docker machine with associated registry credentials | |
# For input variables see $SCRIPT_ROOT/environment | |
# | |
# fail on error (turned off to remain running) |
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
/** | |
* # auth-actions.js | |
* | |
* Auth Actions | |
* | |
* https://firebase.google.com/docs/auth/web/password-auth | |
* | |
* @flow | |
*/ | |
'use strict' |
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 re | |
from collections import Counter | |
# PEP 8 formatted code | |
class GenerateEmailFields: | |
version = '1.0.0' | |
description = 'Generates a list of email fields from a list of names.' | |
names_list = [] |
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 re | |
from collections import OrderedDict | |
# re.MULTILINE | |
line_pattern = re.compile('^([\w\W]+)\.([\w\d]+)\s(\d+)b$') | |
selected_file_types = { | |
'music': ['mp3', 'aac', 'flac'], | |
'images' : ['jpg', 'bmp', 'gif'], | |
'movies' : ['mp4', 'avi', 'mkv'], | |
'other' : ['7z', 'txt', 'zip', 'exe'] |
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/ruby | |
require 'mysql2' | |
require 'base64' | |
begin | |
connection = { | |
host: 'localhost', | |
username: 'username', |
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
/** | |
* # icon.js | |
* | |
* Component | |
* | |
* @author dataday | |
* | |
* @flow | |
*/ | |
'use strict' |
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
const hexToRGBA = (hex: string, opacity: number = 1) => { | |
hex = hex.replace('#', '') | |
let r = parseInt(hex.substring(0, 2), 16) | |
let g = parseInt(hex.substring(2, 4), 16) | |
let b = parseInt(hex.substring(4, 6), 16) | |
return 'rgba(' + r + ',' + g + ',' + b + ',' + opacity + ')' | |
} |
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
... | |
nunjucksRender: { | |
manageEnv: function(env) { | |
const utils = new Utils(); | |
env.addFilter('split', utils.splitFilter); | |
env.addFilter('get', utils.getFilter); | |
env.addFilter('is', utils.isFilter); | |
env.addFilter('classify', utils.classifyFilter); | |
} | |
} |
OlderNewer