Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests | |
# - Access-Control-Max-Age=20days, to minimize repetitive OPTIONS requests |
import com.sun.jersey.api.client.Client; | |
import com.sun.jersey.api.client.WebResource; | |
import lombok.Data; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import javax.ws.rs.core.MediaType; | |
import java.io.IOException; | |
/** | |
* A easy to use class to facilitate calling the IFTTT Maker API (https://ifttt.com/maker) to trigger IFTTT recipes. |
REM BUILD DEPENDS | |
REM 1. .NET 4.0 | |
REM 2. MICROSOFT SDK 7.1 | |
REM 3. ACTIVE PERL <= 5.14 | |
REM 4. PYTHON 2.7 | |
REM 5. MSYS2 | |
REM 6. 7Z | |
REM SET POSTGRESQL VERSION | |
SET PGVER=9.4.4 |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
# Require imagemagick | |
# require potrace | |
# sudo apt-get install imagemagick potrace | |
import os | |
import argparse | |
import glob | |
parser = argparse.ArgumentParser() | |
parser.add_argument( | |
"files", type=str, help="png2svg", nargs="*" |
This is an ad-hoc Java-to-Dart translator originally written on two (admittedly long) evenings.
See http://sma.github.io/stuff/java2dartweb/java2dartweb.html for a demo.
Note: It doesn't support the complete Java grammar specification and cannot translate everything. It only translates syntax and does not attempt to translate Java library classes and methods to Dart equivalents (with the exception of String.charAt
and StringBuffer.append
). You will have to make changes to the resulting Dart code. It does not support anonymous inner classes.
However, I was able to successfully convert a 7000+ line command line application with only minimal fixes in 30 minutes.
function heidiDecode(hex) { | |
var str = ''; | |
var shift = parseInt(hex.substr(-1)); | |
hex = hex.substr(0, hex.length - 1); | |
for (var i = 0; i < hex.length; i += 2) | |
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift); | |
return str; | |
} | |
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393')); |
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |