##Sass Functions Cheat Sheet
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
| # Android SDK setup | |
| ## Install Java | |
| ```bash | |
| sudo apt-get update | |
| sudo dpkg --add-architecture i386 | |
| sudo apt-get install libbz2-1.0:i386 | |
| sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 | |
| sudo apt-get install openjdk-8-jdk openjdk-8-jre |
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
| function logClass(target: any) { | |
| // save a reference to the original constructor | |
| var original = target; | |
| // a utility function to generate instances of a class | |
| function construct(constructor, args) { | |
| var c : any = function () { | |
| return constructor.apply(this, args); | |
| } |
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
| license: gpl-3.0 |
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
| var http = require('http'); | |
| var server = http.createServer(function(req, res) { | |
| // console.log(req); // debug dump the request | |
| // If they pass in a basic auth credential it'll be in a header called "Authorization" (note NodeJS lowercases the names of headers in its request object) | |
| var auth = req.headers['authorization']; // auth is in base64(username:password) so we need to decode the base64 | |
| console.log("Authorization Header is: ", auth); |
This code is a stripped version of actual production code hich employs this JISON clone:
(https://github.com/GerHobbelt/jison)
hence make sure to diff that one against vanilla to see differences/features.
code shows .yy.parseError, lexer.post_lex, parser.post_parser, how to get
the token identifier strings from the JISON-generated parser class, etc.
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
| %options ranges | |
| %options backtrack_lexer | |
| /* | |
| * lexical grammar | |
| * =============== | |
| * | |
| * This section defines the lexer rules for our formula parser. The rules are checked from top to bottom, so order is import | |
| * here! | |
| * |
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
| d3.select("#save").on("click", function(){ | |
| var html = d3.select("svg") | |
| .attr("version", 1.1) | |
| .attr("xmlns", "http://www.w3.org/2000/svg") | |
| .node().parentNode.innerHTML; | |
| //console.log(html); | |
| var imgsrc = 'data:image/svg+xml;base64,'+ btoa(html); | |
| var img = '<img src="'+imgsrc+'">'; | |
| d3.select("#svgdataurl").html(img); |
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
| 1. Backup any databases you have using mysqldump | |
| 2. Stop MySQL using the pref panel | |
| 3. Open Terminal and type in the following commands | |
| 4. sudo rm /usr/local/mysql | |
| 5. sudo rm -rf /usr/local/mysql* | |
| 6. sudo rm -rf /Library/StartupItems/MySQLCOM | |
| 7. sudo rm -rf /Library/PreferencePanes/My* | |
| 8. edit /etc/hostconfig and remove the line MYSQLCOM=-YES- (May not be necessary) | |
| 9. rm -rf ~/Library/PreferencePanes/My* | |
| 10. sudo rm -rf /Library/Receipts/mysql* |
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
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
NewerOlder