Skip to content

Instantly share code, notes, and snippets.

Yohanes Nugroho yohanes

Block or report user

Report or block yohanes

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
View talk.html
<script src="jquery-3.3.1.min.js"></script>
<form onsubmit="return say();">
<input type="text" style="font-size: 72pt; background: #eeeeee" id="t" size=30 >
View talk.php
header("Content-type: application/json");
$lang = "en";
$dir = "/var/www/html/talkdata/";
$text = $_GET['t'];
$m = urlencode($text);
$filename = $lang . "-". $m . ".mp3";
$file = $dir.$filename;
if (!file_exists($file)) {
$mp3 = file_get_contents(
yohanes /
Last active Sep 6, 2016
How many Pidgeys you need to reach an XP (assuming you always evolve after 12 candies and not using lucky egg)
import sys
if (len(sys.argv)<2):
print "Usage: python targetxp"
target_xp = int(sys.argv[1])
print "Target XP ", target_xp
from flask import Flask, redirect, url_for
import os
app = Flask(__name__)
def index():
return """
<html><head><title>HDMI switcher</title><style>
.btn {
yohanes /
Created Jan 28, 2016
Switch a button
import RPi.GPIO as GPIO
import time
GPIO.output(PIN, 1)
GPIO.output(PIN, 0)

Keybase proof

I hereby claim:

  • I am yohanes on github.
  • I am yohanes ( on keybase.
  • I have a public key whose fingerprint is 1095 F8DF 6A46 17E1 693E AAE6 338A 94F8 AC75 B7E0

To claim this, I am signing this object:

% to run it: swipl -g 'conclusion' -t halt -q -s
unique(A) :- aggregate_all(count, A, M), M==1.
birthday_list(15, may).
birthday_list(16, may).
birthday_list(19, may).
birthday_list(29, may).
yohanes / jail1.js
Created Oct 26, 2014
Secuinside 2014
View jail1.js
function (rand) {
function stage1() {
var a = Array.apply(null,
new Array(Math.floor(Math.random() * 20) + 10)).map(function () {return Math.random() * 0x10000;});
var b = rand(a.length);
if (!Array.isArray(b)) {
print("You're a cheater!");
return false;
View altered-solution.c
#include <ctype.h>
#include <string.h>
#include <stdio.h>
char secret_code[] = "B1lR]c5r]Qsqfg";
void alter_digit(char *s)
for (int i = 0; i < strlen(s); ++i)
View altered.c
#include <ctype.h>
#include <string.h>
#include <stdio.h>
char secret_code[] = "b!Lr}C%R}qSQFG";
void alter_digit(char *s)
for (int i = 0; i < strlen(s); ++i)
You can’t perform that action at this time.