Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@zoonderkins
zoonderkins / Javascript ISO country code to country name conversion
Last active December 19, 2017 15:58 — forked from maephisto/Javascript ISO country code to country name conversion
[ISO 3166-1 alpha-2 country code to country name] simple Javascript implementation #javascript #isoCode #geo #data #visualisation
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',
@zoonderkins
zoonderkins / Sublime Text 3 Build 3103 License Key - CRACK
Created June 23, 2017 08:03
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@zoonderkins
zoonderkins / radar.js
Created June 23, 2017 21:48
D3.js v4 Radar chart
//Practically all this code comes from https://github.com/alangrafu/radar-chart-d3
//I only made some additions and aesthetic adjustments to make the chart look better
//(of course, that is only my point of view)
//Such as a better placement of the titles at each line end,
//adding numbers that reflect what each circular level stands for
//Not placing the last level and slight differences in color
//
//For a bit of extra information check the blog about it:
//http://nbremer.blogspot.nl/2013/09/making-d3-radar-chart-look-bit-better.html
/*-----------------------------------------------------------------------------
REQUIRE
-----------------------------------------------------------------------------*/
var yo = require('yo-yo')
var csjs = require('csjs-inject')
var minixhr = require('minixhr')
/*-----------------------------------------------------------------------------
THEME
-----------------------------------------------------------------------------*/
var FONT = 'Ubuntu, sans-serif'
/*-----------------------------------------------------
REQUIRE
-------------------------------------------------------*/
var yo = require('yo-yo')
var csjs = require('csjs-inject')
var minixhr = require('minixhr')
/*-----------------------------------------------------
THEME
-------------------------------------------------------*/
var font = 'Kaushan Script, cursive'
/*-----------------------------------------------------
REQUIRE
-------------------------------------------------------*/
var yo = require('yo-yo')
var csjs = require('csjs-inject')
var minixhr = require('minixhr')
var chart = require('chart.js')
/*-----------------------------------------------------
THEME
-------------------------------------------------------*/
@zoonderkins
zoonderkins / multiple_ssh_setting.md
Created August 29, 2017 04:00 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@zoonderkins
zoonderkins / jsnote.js
Created September 25, 2017 09:38 — forked from mason276752/jsnote.js
你平常不會用到的js
str1 = "http://www.google.tw/search?q=中文";
obj = {
get a(){return '1';},
set b(value){this.c = value;},
c:1
};
class Cls{
constructor(name){
console.log("hello",name);
if (typeof(new.target)==='function')
@zoonderkins
zoonderkins / cors.js
Created December 19, 2017 15:56
[Enable CORS on Server] allow server to request CORS #javascript #node #cors
app.all('*', (req, res, next) => {
res.header("Access-Control-Allow-Origin", req.headers.origin || '*');
res.header("Access-Control-Allow-Headers", "Content-Type, Authorization, X-Requested-With");
res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS");
res.header("Access-Control-Allow-Credentials", true); //可以带cookies
res.header("X-Powered-By", '3.2.1')
if (req.method == 'OPTIONS') {
res.send(200);
} else {
next();
@zoonderkins
zoonderkins / require.js
Created January 5, 2018 13:12
requirejs
window.require = (function (modules) {
var wzrd_URL = 'https://wzrd.in/multi'
function init (name, _module) {
var se = document.createElement('script')
var module = JSON.parse(_module)[name]
var isJSON = (name.split('.').pop()||'').toUpperCase() === 'JSON'
if (module.package.version === '---') {
if (isJSON) {
se.text = `;(function (module) { module.exports = ${module.bundle} })(window.module);`
} else {