(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<!-- | |
--> | |
<html> | |
<head> | |
<title>WebGL Demo</title> | |
<meta charset="utf-8"> | |
<script src="./js/build/Three.js" type="text/javascript"></script> | |
<script src="./js/js/RequestAnimationFrame.js" type="text/javascript"></script> | |
<script src="./js/js/Stats.js" type="text/javascript"></script> |
#include <stdio.h> | |
#include <ffi.h> | |
/* Acts like puts with the file given at time of enclosure. */ | |
void puts_binding(ffi_cif *cif, unsigned int *ret, void* args[], | |
FILE *stream) | |
{ | |
*ret = fputs(*(char **)args[0], stream); | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import gzip | |
import json | |
import requests | |
try: | |
from cStringIO import StringIO | |
except: | |
from StringIO import StringIO | |
# Let's fetch the Common Crawl FAQ using the CC index | |
resp = requests.get('http://index.commoncrawl.org/CC-MAIN-2015-27-index?url=http%3A%2F%2Fcommoncrawl.org%2Ffaqs%2F&output=json') |
function xo_emit_hvp(xop, fmt, vap) | |
{ | |
return xo_emit_hv(xop, fmt, vap); | |
} | |
function xo_emit_hp(xop, fmt, ...args) | |
{ | |
let vap; | |
__builtin_va_start(vap); | |
let rc = xo_emit_hv(xop, fmt, vap); |
curl
to get the JSON response for the latest releasegrep
to find the line containing file URLcut
and tr
to extract the URLwget
to download itcurl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
// The classic AJAX call - dispatch before the request, and after it comes back | |
function myThunkActionCreator(someValue) { | |
return (dispatch, getState) => { | |
dispatch({type : "REQUEST_STARTED"}); | |
myAjaxLib.post("/someEndpoint", {data : someValue}) | |
.then( | |
response => dispatch({type : "REQUEST_SUCCEEDED", payload : response}), | |
error => dispatch({type : "REQUEST_FAILED", error : error}) | |
); |
#include<cstdio> | |
#include<cstring> | |
#ifdef _WIN32 | |
#include <winsock2.h> | |
#include <ws2tcpip.h> | |
#else | |
#include<unistd.h> |
#include <iostream> | |
#include <vector> | |
#include <memory> | |
#include <cereal/archives/binary.hpp> | |
#include <cereal/types/vector.hpp> | |
#include <cereal/types/string.hpp> | |
#include <cereal/types/base_class.hpp> | |
#include <cereal/types/memory.hpp> | |
#include <cereal/access.hpp> |