Skip to content

Instantly share code, notes, and snippets.

@jackjm
jackjm / PhpJava.java
Created September 2, 2016 01:02 — forked from avafloww/PhpJava.java
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();
@jackjm
jackjm / clean-install-linux.sh
Last active September 5, 2015 02:44 — forked from pedro-stanaka/clean-install-linux.sh
Install all things i need in a linux (debian-based)... 64 bits version
#!/bin/sh
# Upgrade packages that are available to update
sudo apt-get update
sudo apt-get -y upgrade
# Miscelaneous tools and media players and game emulators
sudo apt-get install -y build-essential ubuntu-restricted-extras htop vcl smplayer k3b audacity audacious audacious-plugins visualboyadvance pcsxr
@jackjm
jackjm / neidetcher_access_log.sh
Last active August 29, 2015 14:27 — forked from demian0311/neidetcher_access_log.sh
What I use to capture data and create simple graphs for my site, this runs every minute via cron.
#!/bin/sh
name=neidetcher_access
rrdfile="/var/local/${name}.rrd"
imageDir="/home/demian/code/demian0311.github.com/_site"
case "$1" in
create)
rrdtool create $rrdfile --step 60 \
"DS:${name}:GAUGE:120:0:1000000" \
@jackjm
jackjm / dockerfile-hexo
Last active August 29, 2015 14:25 — forked from jamespan/dockerfile-hexo
A Dockerfile for Hexo 3.0
FROM ubuntu:14.04
MAINTAINER Pan Jiabang, panjiabang@gmail.com
RUN \
# use aliyun's mirror for better download speed
sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y nodejs curl git-core && \
# use nodejs as node