Skip to content

Instantly share code, notes, and snippets.

@zaxebo1
zaxebo1 / gist:15c30c11ff2783e91df9c101f9e4ff92
Created March 1, 2018 00:35 — forked from Frozenfire92/gist:3627e38dc47ca581d6d024c14c1cf4a9
Install Scala and SBT using apt-get on Ubuntu 16.04 or any Debian derivative using apt-get
## Java
sudo apt-get update
sudo apt-get install default-jdk
## Scala
sudo apt-get remove scala-library scala
sudo wget http://scala-lang.org/files/archive/scala-2.12.1.deb
sudo dpkg -i scala-2.12.1.deb
sudo apt-get update
sudo apt-get install scala
@zaxebo1
zaxebo1 / addTwo.wast
Created August 11, 2018 02:50 — forked from kanaka/addTwo.wast
Run wast (WebAssembly) in node
(module
(func $addTwo (param i32 i32) (result i32)
(i32.add
(get_local 0)
(get_local 1)))
(export "addTwo" (func $addTwo)))
@zaxebo1
zaxebo1 / Api.java
Created August 22, 2018 08:39 — forked from farandal/Api.java
Play Framework Controller to read Liferay data using the LiferayHelper
package controllers;
import com.google.gson.*;
import com.google.gson.reflect.TypeToken;
import play.*;
import play.api.libs.json.JsValue;
import play.api.libs.json.Json;
import play.api.templates.*;
import play.mvc.*;
@zaxebo1
zaxebo1 / LiferayHelper.java
Created August 22, 2018 08:40 — forked from farandal/LiferayHelper.java
Liferay Helper used in a Play Framework App to query the liferay json api
/* Author: Francisco Aranda ([email protected]) */
package controllers;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.entity.UrlEncodedFormEntity;
@zaxebo1
zaxebo1 / README.md
Created September 10, 2018 06:09 — forked from tyrcho/README.md
Scala from (Windows) command line

A sample batch file running a scala script with process to call external commands.

The same can be done for *nix systems.

@zaxebo1
zaxebo1 / scrdec18-VC8.exe
Created September 20, 2018 02:40 — forked from bcse/scrdec18-VC8.exe
Windows Script Decoder 1.8 (Decoding JScript.Encoded)
@zaxebo1
zaxebo1 / build-static-python.sh
Created September 26, 2018 10:47 — forked from maddouri/build-static-python.sh
A simple script that builds static versions of Python and LibPython using musl-libc
#!/bin/bash
# set -eux
# This a simple script that builds static versions of Python and LibPython using musl-libc
# Find the associated article at: http://general-purpose.io/2015/12/06/compiling-python-and-libpython-statically-using-musl-libc/
WORKING_DIR="/code/static-python"
MUSL_PREFIX="/code/static-python/musl"
PY_PREFIX="/code/static-python/python"
@zaxebo1
zaxebo1 / Console.hx
Created June 26, 2020 14:19 — forked from jasononeil/Console.hx
A really simple proof of concept for a haxe interactive shell
/**
A super basic interactive console for haxe.
Done because someone on the mailing list asked and I got distracted :)
Consider this code Public Domain.
Jason O'Neil
Run using:
haxe -lib hscript -x Console.hx
(you will need hscript installed via haxelib)
@zaxebo1
zaxebo1 / Main.hx
Created July 4, 2020 08:43 — forked from YellowAfterlife/Main.hx
Simplistic .properties parser
class Main {
static function parseProperties(text:String):Map<String, String> {
var map:Map<String, String> = new Map(),
ofs:Int = 0,
len:Int = text.length,
i:Int, j:Int,
endl:Int;
while (ofs < len) {
// find line end offset:
endl = text.indexOf("\n", ofs);
@zaxebo1
zaxebo1 / include.asciidoc.txt
Created July 13, 2020 13:42
A sample AsciiDoc file for testing Asciidoctor.
== Included Section
Look, I came from out of the [blue]#blue#!
--
I'm keepin' it open.
An 'open block', like this one, can contain other blocks.
It can also act as any other block. (TODO)