The content from this article has been moved to a happier home on our official documentation site - please update your bookmarks.
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
'use strict'; | |
const crypto = require('crypto'); | |
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key | |
const IV = "5183666c72eec9e4"; // set random initialisation vector | |
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex'); | |
const phrase = "who let the dogs out"; | |
var encrypt = ((val) => { |
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 | |
REMOTE_TO_SYNC='upstream' # default remote if none passed | |
QUIET=false # run in quiet mode | |
DO_PUSH=false # push to the branches upstream as part of the sync | |
ONLY_LOCAL=false # Only sync local branches (don't pull down from remote) | |
SKIP_FETCH=false # Skip the fetch step - really only useful if you know your up to date | |
Q_FLAG='' # the -q flag for CLI commands - changes to `-q` when running in quiet mode | |
DEBUG=false |
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" src="https://platform.twitter.com/widgets.js"></script> | |
</head> | |
<body> | |
<script> | |
$(document).ready(function() { | |
var url = "https://twitter.com/intent/tweet?" + $.param({ |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"