- A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
- lengths are in any unit (ex: pixels)
- code snippets are in JavaScript
angleRad = angleDeg * Math.PI / 180;
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| /* | |
| * Copyright (c) 2013 Calvin Rien | |
| * | |
| * Based on the JSON parser by Patrick van Bergen | |
| * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
| * | |
| * Simplified it so that it doesn't throw exceptions | |
| * and can be used in Unity iPhone with maximum code stripping. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining |
| """ | |
| ``ass2dcl`` converts subtitles from ASS to DCSubtitle format. | |
| It depends on python3 and `pysub <http://pypi.python.org/pypi/pysubs>`_. | |
| INSTALL | |
| :: |
| var WA_API_KEY = @""; | |
| var VoiceOut = new System.Speech.Synthesis.SpeechSynthesizer(); | |
| VoiceOut.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult, 0, CultureInfo.CurrentCulture); | |
| VoiceOut.SetOutputToDefaultAudioDevice(); | |
| var WA = new WAClient(WA_API_KEY); | |
| WA.OnResultReceived += (WAResult, input) => | |
| { | |
| try |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| /* Author @jpsarda | |
| * A drawing class. | |
| * | |
| * Examples : | |
| * |
| # Node-WebKit CheatSheet | |
| # Download: https://github.com/rogerwang/node-webkit#downloads | |
| # Old Versions: https://github.com/rogerwang/node-webkit/wiki/Downloads-of-old-versions | |
| # Wiki: https://github.com/rogerwang/node-webkit/wiki | |
| # How: https://github.com/rogerwang/node-webkit/wiki/How-node.js-is-integrated-with-chromium | |
| # 1. Run your application. | |
| # https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps |
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
| import urllib | |
| import datetime as dt | |
| import pytz | |
| from PIL import Image | |
| import numpy as np | |
| import subprocess | |
| import socket | |
| import os | |
| dir = '/FULL/PATH/TO/SCRIPT/DIR' |
| package main | |
| import ( | |
| "log" | |
| "syscall" | |
| "unsafe" | |
| ) | |
| var ( | |
| kernel32 = syscall.NewLazyDLL("kernel32.dll") |