Skip to content

Instantly share code, notes, and snippets.

@mikatalk
mikatalk / gist:f9ffcefa4a35e279f2228c3288a47a69
Created April 8, 2019 17:00
Install QGIS on Mojave 10.14.3
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 November 30, 2017 05:12
Apache proxy pass to local node server
```
# /etc/hosts
127.0.0.1 node.server.local
```
```
# httpd.conf
/**
* 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
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;
@mikatalk
mikatalk / gist:7e722cc2d338f16aaa4e
Created November 12, 2015 16:28
Unfollow non-followers
$('.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 November 6, 2015 19:33
wordnet-magic example - code review
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 November 6, 2015 05:52
wordnet-magic example - code review
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:045ef797f33c85df4ad2
Created November 6, 2015 00:47
Asset Loader Singleton
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;
@mikatalk
mikatalk / xss.html
Created October 3, 2015 18:26
xss.html
<script>alert('XSS');</script>
@mikatalk
mikatalk / xss.js
Last active October 3, 2015 18:24
xss.js
alert('XSS');