sudo apt-get update && sudo apt-get install imagemagick gs
mkdir -p pdf_conversion/{merged,split}
cd pdf_conversion
Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.
All files were downloaded from https://cdnjs.com and named accordingly.
Output from ls
command is stripped out (irrelevant stuff)
$ ls -lhS
566K Jan 4 22:03 angular2.min.js
jspm_packages |
import Data.List | |
import Data.Ord | |
-- Tower of Hanoi implementation | |
type Peg = String | |
type Move = (Peg, Peg) | |
hanoi :: Integer -> Peg -> Peg -> Peg -> [Move] | |
hanoi 0 a b c = [ ] | |
hanoi n a b c = hanoi (n-1) a c b ++ [(a,b)] ++ hanoi (n-1) c b a |
// Run this from the commandline: | |
// phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4 | |
var page = require('webpage').create(), | |
address = 'http://s.codepen.io/phanan/fullembedgrid/YPLewm?type=embed&safe=true&_t=1424767252279', | |
duration = 3, // duration of the video, in seconds | |
framerate = 24, // number of frames per second. 24 is a good value. | |
counter = 0, | |
width = 500, | |
height = 500; |
The final result: require() any module on npm in your browser console with browserify
This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.
Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5
<html> | |
<head> | |
<title>Wordnik demo from JavaScript</title> | |
<script src="http://static.smallpicture.com/bootstrap/js/jquery-1.9.1.min.js"></script> | |
<script> | |
var baseUrl = "http://api.wordnik.com/v4/word.json/"; | |
var apiKey = "a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5"; //demo key from developer.wordnik.com | |
function getSynonyms (theWord, callback) { | |
var url = baseUrl + theWord + "/relatedWords?useCanonical=true&relationshipTypes=synonym&limitPerRelationshipType=100&api_key=" + apiKey; | |
var jxhr = $.ajax ({ |
A curl example to help explain this Stack Overflow question related to creating a new branch via the GitHub Git Refs API:
curl -i https://api.github.com/repos/jasonrudolph/sandbox/git/refs/heads/master \
-H "Authorization: token REDACTED"
HTTP/1.1 200 OK
...
[ | |
{ "keys": ["super+shift+,"], "command": "focus_group", "args": { "group": 0 } }, | |
{ "keys": ["super+shift+."], "command": "focus_group", "args": { "group": 1 } }, | |
{ "keys": ["super+shift+/"], "command": "focus_group", "args": { "group": 2 } }, | |
{ "keys": ["alt+super+,"], "command": "move_to_group", "args": { "group": 0 } }, | |
{ "keys": ["alt+super+."], "command": "move_to_group", "args": { "group": 1 } }, | |
{ "keys": ["alt+super+/"], "command": "move_to_group", "args": { "group": 2 } }, | |
{ "keys": ["super+1"], "command": "focus_group", "args": { "group": 0 } }, |