Skip to content

Instantly share code, notes, and snippets.

View gist:f9ffcefa4a35e279f2228c3288a47a69
brew cask install xquartz
brew tap osgeo/osgeo4mac
brew unlink python && brew link --force python
brew reinstall ninja gsl python qt osgeo-sip osgeo-pyqt osgeo-pyqt-webkit osgeo-qscintilla2 six bison flex pkg-config
brew link --overwrite osgeo-pyqt
brew unlink gettext && brew link --force gettext
ulimit -n 2048
brew install osgeo-qgis
@mikatalk
mikatalk / Apache-proxy-pass-to-local-node-server
Created Nov 30, 2017
Apache proxy pass to local node server
View Apache-proxy-pass-to-local-node-server
```
# /etc/hosts
127.0.0.1 node.server.local
```
```
# httpd.conf
View ColorSpaceConvertions.js
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation
View Geometry FBO
var THREE = require( 'three' );
var OrbitControls = require( 'three-orbit-controls' );
var ColladaLoader = require( '../../libs/loaders/ColladaLoader' );
import * as dat from '../../libs/utils/dat.gui.min';
const SIZE = 256;
const vertexShader = `
precision highp float;
View gist:7e722cc2d338f16aaa4e
$('.ProfileCard.js-actionable-user').each( function(index){
if ( !$( this ).find('.FollowStatus').length ) {
$( this ).find('.user-actions-follow-button.js-follow-btn.follow-button').click();
}
});
@mikatalk
mikatalk / gist:1159a579ea2f2f97aa76
Last active Nov 6, 2015
wordnet-magic example - code review
View gist:1159a579ea2f2f97aa76
var inspect = require('util-inspect');
var wordNet = require('util')
var wordNet = require('wordnet-magic')
var wn = wordNet(__dirname + '/sqlite-31.db', false)
var input = 'the cat is patiently waiting at some of the best hospitals in Los Angeles'
var words = input.split(' ')
var sort = { nouns:[], verbs:[], adjectives:[], adverbs:[] }
processWord(0)
@mikatalk
mikatalk / gist:50a5d17bef128efa8a50
Created Nov 6, 2015
wordnet-magic example - code review
View gist:50a5d17bef128efa8a50
var inspect = require('util-inspect');
var wordNet = require('util')
var wordNet = require('wordnet-magic')
var wn = wordNet(__dirname + '/sqlite-31.db', false)
var input = 'the cat is patiently waiting at some of the best hospitals in Los Angeles'
var words = input.split(' ')
var sort = { nouns:[], verbs:[], adjectives:[], adverbs:[] }
processWord(0)
View gist:045ef797f33c85df4ad2
package com.samere
{
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;
View xss.html
<script>alert('XSS');</script>
View xss.js
alert('XSS');