Minimal example making webpack and wasm/Emscripten work together.
Build instructions:
- Clone this gist
npm install
npm start
- Open
http://localhost:8080
- Look at console
Minimal example making webpack and wasm/Emscripten work together.
Build instructions:
npm install
npm start
http://localhost:8080
/** | |
* Example of how to get the number of followers for a Medium.com User. | |
* | |
* | |
* Related links: | |
* https://github.com/Medium/medium-api-docs/issues/30#issuecomment-227911763 | |
* https://github.com/Medium/medium-api-docs/issues/73 | |
*/ | |
// LODASH |
<?php | |
// The location of the Unicode CLDR "windowsZones" mappings here | |
const XML_URL = 'http://unicode.org/cldr/data/common/supplemental/windowsZones.xml'; | |
const XML_ZONE_MAP_XPATH = '/supplementalData/windowsZones/mapTimezones/mapZone'; | |
const ZONE_TERRITORY_ATTRIBUTE = 'territory'; | |
const ZONE_IANA_NAME_ATTRIBUTE = 'type'; | |
const ZONE_WINDOWS_NAME_ATTRIBUTE = 'other'; |
<!-- MongoDB has a command named mongoimport which can be used to directly upload a CSV file into a particular collection of | |
a database with the first line of the csv as the keys and the following rest of the csv as the values for the respective keys | |
The format of mongoimport is as folllows | |
"mongoimport --db database_name --collection collection_name --file csv_file_name --type csv" | |
now we can use variables to store our database and collection's name. | |
we upload the file to get the filename and it's path and then simple substitute the database_name and collection_name etc |
#include "FastLED.h" | |
#define NUM_LEDS 255 | |
#define DATA_PIN SPI_DATA | |
#define CLOCK_PIN SPI_CLOCK | |
// Define the array of leds | |
CRGB leds[NUM_LEDS]; |
<?php | |
/** | |
* Please be aware. This gist requires at least PHP 5.4 to run correctly. | |
* Otherwise consider downgrading the $opts array code to the classic "array" syntax. | |
*/ | |
function getMp3StreamTitle($streamingUrl, $interval, $offset = 0, $headers = true) | |
{ | |
$needle = 'StreamTitle='; | |
$ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36'; |
import java.awt.AWTException; | |
import java.awt.Robot; | |
KeystrokeSimulator keySim; | |
void setup(){ | |
keySim = new KeystrokeSimulator(); | |
} | |
void draw(){ |
function fetchSongInfo(track) { | |
info('Getting song info for ' + track.name + ' by ' + track.artists[0].name); | |
var url = 'http://developer.echonest.com/api/v4/track/profile?api_key=N6E4NIOVYMTHNDM8J&callback=?'; | |
var track_id = fromSpotify(track.uri); | |
$.getJSON(url, { id: track_id, format:'jsonp', bucket : 'audio_summary'}, function(data) { | |
if (checkResponse(data)) { | |
info(""); | |
showTrackInfo(data.response.track); | |
fetchAnalysis(data.response.track); |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |