Skip to content

Instantly share code, notes, and snippets.

Jason Yeo jsyeo

Block or report user

Report or block jsyeo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jsyeo
jsyeo / Dockerfile
Created Feb 1, 2018
Building spectrecoin wallet in a docker container
View Dockerfile
FROM ubuntu:artful
RUN apt update
RUN apt install -y build-essential libssl1.0-dev libevent-dev libseccomp-dev libcap-dev libboost-all-dev pkg-config git autoconf
RUN git clone --recursive https://github.com/XSPECOfficial/spectre
WORKDIR /spectre
RUN bash ./autogen.sh
RUN bash ./configure
RUN make -j2
View ergodox.json
{
"header": {
"Name": "MDErgo1",
"Layout": "Default",
"Base": "Blank",
"Version": "0.1",
"Author": "HaaTa (Jacob Alexander) 2015",
"KLL": "0.3c",
"Date": "2015-09-12",
"Generator": "KIICONF 0.2"
View Bridge.java
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
Visitor<Integer> intVisitor = new Visitor<Integer>() {
@Override
public Integer visitInt() {
System.out.println("LOL");
return null;
@jsyeo
jsyeo / hs_err_pid43902.log
Created Sep 23, 2016
SIGSEGV in JVM while running jruby
View hs_err_pid43902.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff9b562f49, pid=43902, tid=0x0000000000000b23
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libsystem_platform.dylib+0x4f49] _platform_memmove$VARIANT$Haswell+0x29
#
View gist:a9b64caa8ecdf48c6ebd
#!/usr/bin/env python
## WARNING: This file is generated
#!/usr/bin/env python
"""Create a "virtual" Python installation
"""
__version__ = "13.1.2"
virtualenv_version = __version__ # legacy
import base64
View debug.java
private String debugString(CallChain cc) {
StringBuilder sb = new StringBuilder();
for (CallSite cs : cc) {
sb.append(cs.getCaller().getClassName());
sb.append(".");
sb.append(cs.getCaller().getMethodName());
sb.append("->");
}
sb.append(cc.last().getCallee().getMethodName());
@jsyeo
jsyeo / Main.java
Created Jan 4, 2016
Two Inner Classes
View Main.java
public class Main {
public static void main(String[] args) {
a().evaluate();
}
public static Expression a() {
final Expression e = SimpleExpression.builder();
return new Expression() {
@Override
@jsyeo
jsyeo / precise_sources.list
Created Dec 7, 2015
Ubuntu DO sources.list
View precise_sources.list
deb http://mirrors.digitalocean.com/ubuntu precise main restricted universe multiverse
deb http://mirrors.digitalocean.com/ubuntu precise-updates main restricted universe multiverse
deb http://mirrors.digitalocean.com/ubuntu precise-backports main restricted universe multiverse
deb http://mirrors.digitalocean.com/ubuntu precise-security main restricted universe multiverse
View Main.java
import java.util.Arrays;
import java.util.stream.Collectors;
public class Main {
public static void main(String[] args) {
// write your code here
System.out.println(Arrays.asList(1, 2, 3).stream().map(x -> x * x).collect(Collectors.toList()));
}
}
@jsyeo
jsyeo / Main.java
Created Sep 9, 2015
Reflection with Method Param
View Main.java
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class Main {
public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
// write your code here
Class a = A.class;
Method m = a.getMethod("vulnerableMethod", int.class);
m.invoke(null, 5);
You can’t perform that action at this time.