View tsne-transform.py
# Author: HJ van Veen <info@mlwave.com>
# Description: Experiment to learn a tSNE transformer for new
# test data with a multi-output GBM
#
# Idea first seen at lvdmaaten.github.io/tsne
# > [...] it is not possible to embed test points in an existing
# > map [...]
# > A potential approach to deal with this would be to train
# > a multivariate regressor to predict the map location from
# > the input data.
View clean-headers.R
clean_headers = function(headers) {
# Make lowercase
headers = tolower(headers)
# Replace symbols
headers = gsub(' ', '', headers, fixed = TRUE)
headers = gsub('.', '_', headers, fixed = TRUE)
headers = gsub('[^[:alnum:]_]', '', headers) # remove all symbols except '_'
View cylinder.groovy
CSG simpleSyntax =new Cylinder(10,10,40,(int)30).toCSG() // a one line Cylinder
//create a Cylinder
CSG myCylinder = new Cylinder(10, // Radius at the bottom
20, // Radius at the top
40, // Height
(int)30 //resolution
).toCSG()//convert to CSG to display ).toCSG()//convert to CSG to display
.movey(50)
//create a Cylinder
View ReadNfcUIDActivity.java
// Needed in AndroidManifest:
<!-- Permission for using NFC hardware -->
<uses-permission android:name="android.permission.NFC"/>
<!-- Forcing device to have NFC hardware -->
<uses-feature android:name="android.hardware.nfc" android:required="true"/>
<!-- Registering app for receiving NFC's TAG_DISCOVERED intent -->
<intent-filter>
<action android:name="android.nfc.action.TAG_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
View Wordlist de Numero{{Fsociety Brasil}}
import webbrowser
import os
h = int(input("""
[1]Fazer Wordlist
[2]Como funciona
>>>"""))
while h != 1 and h != 2:
h = int(input('>>> '))
if h == 1: #J
View nvim-terminal-edit.py
#!/usr/bin/env python
"""Edit a file in the host nvim instance."""
from __future__ import print_function
import os
import sys
from neovim import attach
args = sys.argv[1:]
if not args:
View tmux.cheat
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
View how-to-set-up-stress-free-ssl-on-os-x.md

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying