Skip to content

Instantly share code, notes, and snippets.

Florin Stancu niflostancu

  • Romania
Block or report user

Report or block niflostancu

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
@niflostancu
niflostancu / eval_bonus.sh
Created Nov 19, 2012
Evaluator bonus Tema 2 CPL
View eval_bonus.sh
#!/bin/bash
TESTS_DIR="_tests"
export CLASSPATH="$CLASSPATH:./bin:antlr-3.4.jar:java-cup-11a-runtime.jar"
PARSER="java Semant"
function fail {
printf "FAIL (%s)\n" "$1"
View robot.js
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@niflostancu
niflostancu / rootfs_ubuntu_16.04_btrfs.md
Created Jan 4, 2017
Installing Ubuntu 16.04 on btrfs using debootstrap
View rootfs_ubuntu_16.04_btrfs.md

Installing Ubuntu 16.04 with btrfs using debootstrap

Partition layout

First, create a GPT partition table.

  1. boot partition, label: EFI, flags: boot + ESP; size: 1GB, format to FAT32;
  2. root partition (label: root), must same size on all devices!
  3. swap partition.
View rename-moode-as.sh
#!/bin/bash
NAMES_CSV="$(realpath "$2")"
set -e
cd "$1"
for dir in *; do
if [[ "$dir" =~ _([0-9]+)_ ]]; then
ID=${BASH_REMATCH[1]}
@niflostancu
niflostancu / wkhtmltopdf.tablesplit.js
Last active May 31, 2019
WkHtmlToPdf Table Splitting Hack
View wkhtmltopdf.tablesplit.js
/**
* WkHtmlToPdf table splitting hack.
*
* Script to automatically split multiple-pages-spanning HTML tables for PDF
* generation using webkit.
*
* To use, you must adjust pdfPage object's contents to reflect your PDF's
* page format.
* The tables you want to be automatically splitted when the page ends must
* have a class name of "splitForPrint" (can be changed).
You can’t perform that action at this time.