A Pen by Declan Cook on CodePen.
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
from xml.dom.minidom import Document | |
import os | |
import sys | |
validExt = ('.avi') #only add files with these extensions to the playlist | |
if(len(sys.argv) > 1): | |
rootdir = sys.argv[1]+'/' | |
print(sys.argv[1]) | |
else: |
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
/* | |
* Quickly made upgrade script from running through html files and replacing old font awesome classes with new. Be warned will make changes to any icon-* classes | |
* | |
* Author: Declan Cook | |
* Usage: node faupgrade.js <htmlfile> | |
*/ | |
var fs = require('fs'), | |
lookup = {"ban-circle":"ban","bar-chart":"bar-chart-o","beaker":"flask","bell":"bell-o","bell-alt":"bell","bitbucket-sign":"bitbucket-square","bookmark-empty":"bookmark-o","calendar-empty":"calendar-o","check":"check-square-o","check-empty":"square-o","check-minus":"minus-square-o","check-sign":"check-square","chevron-sign-down":"chevron-circle-down","chevron-sign-left":"chevron-circle-left","chevron-sign-right":"chevron-circle-right","chevron-sign-up":"chevron-circle-up","circle-arrow-down":"arrow-circle-down","circle-arrow-left":"arrow-circle-left","circle-arrow-right":"arrow-circle-right","circle-arrow-up":"arrow-circle-up","circle-blank":"circle-o","collapse":"caret-square-o-down","collapse-alt":"collapse-o","collapse-top":"caret-square-o-up","comment-a |
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
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$wc=new-object net.webclient; $wc.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials;$wc.DownloadString('https://chocolatey.org/install.ps1') | iex" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin |
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 gZeroLeft = 0; | |
var gZeroTop = 0; | |
var gWinWidth = window.innerWidth || document.documentElement.clientWidth; | |
function findImages() { | |
var aElems = document.getElementsByTagName('*'); | |
var re = /url\((http.*)\)/ig; | |
for ( var i=0, len = aElems.length; i < len; i++ ) { | |
var elem = aElems[i]; | |
var style = window.getComputedStyle(elem); |
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
#!/bin/bash | |
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$') | |
do | |
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes | |
if [ $? -ne 0 ]; then | |
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint." | |
exit 1 # exit with failure status | |
fi | |
done |
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
# dircolors for WSL | |
# Usage: eval `dircolors ~/.dircolors.wsl` (bash) | |
# http://www.bigsoft.co.uk/blog/index.php/2008/04/11/configuring-ls_colors | |
TERM Eterm | |
TERM ansi | |
TERM color-xterm | |
TERM con[0-9]*x[0-9]* | |
TERM cons25 |
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
In your all your plugins you extend QuirkPlugin now not CSharpPlugi. | |
Then you can put `[ChatCommand("auth")]` style attributes on your chat commands rather than register them |
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
from __future__ import unicode_literals, print_function | |
import io | |
import json | |
from snips_nlu import SnipsNLUEngine | |
from snips_nlu.default_configs import CONFIG_EN | |
from snips_nlu.dataset import Dataset | |
with io.open("dataset/remind.yaml") as f: | |
dataset = Dataset.from_yaml_files("en", [f]) |
OlderNewer