Skip to content

Instantly share code, notes, and snippets.

View hugot's full-sized avatar

Hugo hugot

View GitHub Profile

I haven't used phpinspect.el before. It looks like good software for working with PHP.

Thanks! IMO It is good software for working with PHP, I use it every day at my dayjob. I'll be the first to admit that it still needs work though, and is not yet competitive with the commercial offerings available on many fronts.

Would you tell us a bit about how this splay tree library is hooked into the incremental parser? e.g. if the user inserts a single character, what chain of operations does that set off?

@hugot
hugot / route-to-ip.bash
Created April 30, 2022 13:00
Make a linux system act as a NAT router for another node
#!/bin/bash
if [[ $# -ne 1 ]]; then
echo 'Usage: '"$0"' IP_ADDRESS' >&2
exit 1
fi
ip="$1"
set -x
@hugot
hugot / tree
Last active April 20, 2018 12:26
Little script to build software using basher as dependency manager
#!/bin/bash
##
# Build software with basher.
read -rd '' HELP <<'EOF'
tree - Build software from custom build scripts, into a directory tree of your choosing.
USAGE: tree COMMAND [ AUTHOR/REPO ] [ OPTIONS ]
COMMANDS:
new : Initialize a new tree project. Respects --dir argument if given.
#!/bin/bash
##
# print a SIT banner to a terminal :)
printStuff() {
while read -r line; do
for ((i = 0; i < ${#line}; i++)) ; do
sleep 0.01
echo -n "${line:$i:1}"
done
#! /usr/bin/env bash
#
# replaceslash.sh
# Copyright (C) 2017 hugo <hugo@supersudomachine>
#
# Distributed under terms of the MIT license.
#
[ -f NClass.build ] || (
echo failed to find the build file, execute this script in the root of the NClass project && exit 1
package nl.hva.dmci.ict.se.datastructures.fibonacci;
import java.math.BigInteger;
import java.util.function.Consumer;
import edu.princeton.cs.algs4.Stopwatch;
public class FastFibonacci {
static double timeStart;
// cmd: cat dikkie.json | POST -sS "http://127.0.0.1:5984/dikkie/_bulk_docs" -c "application/json"
{
"docs": [
{
"Voornaam": "Sander",
"id": 7064,
"Achternaam": "Lauridsen",
"Geboortedatum": "1-nov-76",
"Straat": "Taylorweg 70",
"Postcode": "5466AE",
@hugot
hugot / cloudSettings
Created June 3, 2017 21:04
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-06-03T21:04:31.484Z","extensionVersion":"v2.8.1"}
@hugot
hugot / cloudSettings
Created June 3, 2017 20:54
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-06-03T20:54:54.028Z","extensionVersion":"v2.8.1"}
#!/usr/bin/env bash
#
# image_sorter.sh
# Copyright (C) 2017 Hugo
#
# Distributed under terms of the MIT license.
#
# This script will sort the image and video files from an android phone by date by placing them in directories
# according to the dates that can be extracted from the filename. The filenames of the images must be structured
# as follows: yyyymmdd_HHMMSS.jpg or yyyymmdd_HHMMSS.mp4 (other extentions can be added easily)