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
| fetch('http://httpbin.org/get?name=name&password=passwd') | |
| .then(response => response.json()) | |
| .then( | |
| data => console.log(`User - ${data.args.name}`), | |
| error => console.log(error.message) | |
| ); | |
| fetch('http://httpbin.org/status/401') | |
| .then(response => response.json()) | |
| .then( |
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 bash | |
| OUT_FODLER="build" | |
| SASS_OPTIONS="--output-style expanded --indent-type space --indent-width 4 --linefeed lf --precision 8" | |
| SASS_FOLDERS="--output ${OUT_FODLER}/css src/scss" | |
| rm -rf ${OUT_FODLER} | |
| mkdir -p ${OUT_FODLER}/js | |
| node-sass ${SASS_OPTIONS} ${SASS_FOLDERS} |
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 f in *.m4a; do avconv -i "$f" -acodec flac "${f%.m4a}.flac"; 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
| from pymongo import MongoClient | |
| import requests | |
| # Your Untappd details... | |
| untappd_user = '' | |
| untappd_client_id = '' | |
| untappd_client_secret = '' | |
| # Connect to the local MongoDB instance... | |
| client = MongoClient() |
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
| # Thecus N3200 mount points, assuming your NAS has a fixed IP of 192.168.0.100 | |
| 192.168.0.100:/raid/Bob /home/boba/nas/bob nfs rw | |
| 192.168.0.100:/raid/Photos /home/boba/nas/photos nfs rw | |
| 192.168.0.100:/raid/Music /home/boba/nas/music nfs rw | |
| 192.168.0.100:/raid/Video /home/boba/nas/video nfs rw |
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
| # Assuming you are seting this from the same folder as you | |
| # are building your code with Maven... | |
| export HADOOP_CLASSPATH=./target/classes |
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
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-dependency-plugin</artifactId> | |
| <version>2.6</version> | |
| <executions> | |
| <execution> | |
| <id>copy-dependencies</id> | |
| <phase>prepare-package</phase> | |
| <goals> | |
| <goal>copy-dependencies</goal> |
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 | |
| find . -type f -name *.mkv | while read filename; do mkvextract tracks "$filename" 3:"${filename%.*}".flac; 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
| Backbone.View.extend({ | |
| events: { | |
| 'click a.enable': 'enableHandler', | |
| 'click a.disable': 'disableHandler' | |
| }, | |
| initialize: function() { | |
| this.model = new Model(); | |
| this.model.bind('change', this.render, this); |