Inspiration: Linux and Unix nc command
Example protobuf definition:
message Person {
required string name = 1;
required int32 id = 2;
import os,tty;tty.setcbreak(0);M=['']*16 | |
def G(v): | |
p=['']*4;u=list(filter(str,v));i=3 | |
while u:z=u.pop();p[i]=u and z==u[-1]and 2*u.pop()or z;i-=1 | |
return p | |
def Y(M,k):i=1;M=zip(*[iter(M)]*4);exec'M=map([list,G][i*k==k*k],zip(*M))[::-1];i+=1;'*4;return sum(M,[]) | |
while 1: | |
r=id(M)%71+17 | |
while M[r%16]*r:r-=1 | |
if r:M[r%16]=r%7%2*2+2 |
import javafx.application.Application; | |
import javafx.beans.property.ReadOnlyObjectWrapper; | |
import javafx.collections.ListChangeListener; | |
import javafx.collections.ObservableList; | |
import javafx.scene.Group; | |
import javafx.scene.Scene; | |
import javafx.scene.control.TableColumn; | |
import javafx.scene.control.TableView; | |
import javafx.scene.control.skin.TableHeaderRow; | |
import javafx.stage.Stage; |
JMX_IP=$(curl http://169.254.169.254/latest/meta-data/public-ipv4) | |
exec java $JAVA_OPTS -Djava.rmi.server.hostname=$JMX_IP -jar app.jar $JAVA_ARGS |
package utils; | |
import java.security.GeneralSecurityException; | |
import java.security.SecureRandom; | |
import java.security.cert.X509Certificate; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.TrustManager; | |
import javax.net.ssl.X509TrustManager; |
#!/bin/bash | |
# https://gist.github.com/joshenders/52cb78bedaea6787faac | |
# This script uses the BSD variants of commands and is intended to | |
# be run on an unmodified installation of OSX. | |
pmset noidle & | |
now=$(date +%s) | |
duration=$((86400*3)) # 3days |
Inspiration: Linux and Unix nc command
Example protobuf definition:
message Person {
required string name = 1;
required int32 id = 2;
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"