apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name desmosPlayer | |
// @namespace http://github.com/jason-woolf | |
// @version 1.0.0 | |
// @description Program a series of graph changes to create animation | |
// @author Jason Woolf (MathyJaphy) | |
// @match https://www.desmos.com/calculator* | |
// @grant none | |
// @run-at document-idle | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"content_scripts": [ | |
{ | |
"matches": ["http://*/*", "https://*/*"], | |
"js": ["inject.js"], | |
"all_frames": true | |
} | |
], | |
"web_accessible_resources": [ | |
"content.js" |
Not all random values are created equal - for security-related code, you need a specific kind of random value.
A summary of this article, if you don't want to read the entire thing:
- Don't use
Math.random()
. There are extremely few cases whereMath.random()
is the right answer. Don't use it, unless you've read this entire article, and determined that it's necessary for your case. - Don't use
crypto.getRandomBytes
directly. While it's a CSPRNG, it's easy to bias the result when 'transforming' it, such that the output becomes more predictable. - If you want to generate random tokens or API keys: Use
uuid
, specifically theuuid.v4()
method. Avoidnode-uuid
- it's not the same package, and doesn't produce reliably secure random values. - If you want to generate random numbers in a range: Use
random-number-csprng
.
You should seriously consider reading the entire article, though - it's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### java -jar | |
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar | |
### Maven | |
Debug Spring Boot app with Maven: | |
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// blog post: https://unitycoder.com/blog/2016/03/01/latitude-longitude-position-on-3d-sphere-v2/ | |
using UnityEngine; | |
public class LatLong : MonoBehaviour | |
{ | |
public Transform marker; // marker object | |
public float radius = 5; // globe ball radius (unity units) | |
public float latitude = 51.5072f; // lat |
EDIT: You can find this same updated tutorial here -> Medium
Now I'm going to list how to publish an Android libray to jCenter and then syncronize it with Maven Central:
- I use "Android Studio" and I have this simple android lib that I would like to be available on maven: CircularImageView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileDescriptor; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
public class HelloWorld{ | |
private static HelloWorld instance; | |
public static void main(String[] args){ | |
instantiateHelloWorldMainClassAndRun(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script to install, run, and open logcat for a Unity Android App. | |
# I needed this as one of my libraries has a critical post-build script so I can't use "Build and Run" anymore - this is the "and Run" part. | |
# Be sure to update these variables to match your app's publishing/build settings: | |
APK_PATH='builds/android/basecode.apk' | |
BUNDLE_ID='com.eliotlash.basecode' | |
alias unilogcat='adb logcat|egrep "Unity"' | |
adb install -r "${APK_PATH}" && adb logcat -c && adb shell am start -n "${BUNDLE_ID}/com.unity3d.player.UnityPlayerNativeActivity" && echo 'DONE, LOG:' && unilogcat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* FILE: api/hooks/reindex-db.js | |
* | |
* Created by mcrowe on 1/28/15. | |
* | |
* Insures indices recreated if needed, and allows complex indicies to be specified in the model as well. Example: | |
* | |
module.exports = { | |
schema : true, | |
version : "1.3", |
NewerOlder