Skip to content

Instantly share code, notes, and snippets.

View liclac's full-sized avatar
~liclac

embr liclac

~liclac
View GitHub Profile
@liclac
liclac / hewwo.pl
Last active October 1, 2023 11:48
Hewwo? (Based on leafysweetsgarden's OWO extension)
#!/usr/bin/env -S perl -p
tr/rlRL/wwWW/; s/([nN])([aeiou])/\1y\2/g; s/(N)([AEIOU])/\1Y\2/g; s/ove/uv/g;
s/\!+/" ".("(・`ω´・)",";;w;;","owo","UwU",">w<","^w^")[rand(6)]." "/eg;
set -l data_status (curl -s https://iceportal.de/api1/rs/status)
set -l data_trip (curl -s https://iceportal.de/api1/rs/tripInfo/trip)
# next stop
echo  (echo $data_trip | jq -r '([ .trip.stops[] | select(.info.passed==false) ]
| first).station.name')
# train number
echo  (echo $data_trip | jq -r '"\(.trip.trainType)-\(.trip.vzn)"')
# speed
echo speed (echo $data_status | jq -r '"\(.speed) km/h"')
@liclac
liclac / signal
Last active October 13, 2018 14:51
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
My signal fingerprint is:
44572 52815 65375 68546 87292 72671
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEMzCoCOFQR+bR1QRWvR6f7eVoMBsFAlvCBlAACgkQvR6f7eVo
MBsy6w/+LNt5tXKS3EQi3OwxxevCgo16KeE+8RzYY3dHGNhAPV7N8a5I79bviI1+
ylu5NZTApcOCnOwFHumHEG7etKC7xslezLjwJnNAs1lhYlbuuLtpOkrVK19xKn8d

Keybase proof

I hereby claim:

  • I am liclac on github.
  • I am liclac (https://keybase.io/liclac) on keybase.
  • I have a public key ASD0_TclXuRfuMkMroElfjv3K5hfgqel7QJZ8dJ6MRVgVwo

To claim this, I am signing this object:

@liclac
liclac / production
Last active April 7, 2018 05:56
turns out it's super easy to get a functional k8s cluster these days
master ansible_user=root ansible_host=1.2.3.4
node-1 ansible_user=root ansible_host=1.2.3.5
node-2 ansible_user=root ansible_host=1.2.3.6
[k8s.master]
master
[k8s.node]
node-1
node-2
@liclac
liclac / jsonkeys.go
Created July 28, 2016 20:34
Finding unhandled keys on JSON objects in Go
package jsonkeys
import (
"fmt"
"reflect"
"strings"
)
// Returns a list of keys a JSON representation of this object would have.
// Works with maps (any key type; converted to strings with fmt.Sprint()), or structs (respecting
@liclac
liclac / bug328.py
Created October 12, 2014 13:09
Demonstration of Flask-Security #328
from flask import Flask, render_template
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.security import Security, SQLAlchemyUserDatastore, \
UserMixin, RoleMixin, login_required
from flask.ext.security.utils import *
# Create app
app = Flask(__name__)
app.config['DEBUG'] = True
app.config['SECRET_KEY'] = 'super-secret'
@liclac
liclac / SWPv1.md
Created May 27, 2014 17:54
SWP v1 Format Specification

SWP v1 Format Specification

SWP is a file format used to describe per-tag patches for an SWF file. It is designed to make it possible to apply patches in-stream, without having to keep more than a single tag of an SWF file and the SWP file's index in-memory at a time.

An SWP file is a container consisting of multiple patches. The word "container" here refers to the SWP file, "patch" to an individual entry within it, "SWF" to an SWF file (duh) and "tag" to a tag within said SWF (see the SWF spec). "Payload" is ambiguous, and should always be qualified as "tag payload" or "patch payload" in this context.


Everything is Little Endian. The SWF format uses little endian, and so does every platform on which Flash Player runs.

OpenCart Issue #1286

This is the full version of the thread for opencart#1286, archived from notification emails.
The discussion has since been deleted almost entirely by OpenCart's developer.
Everyone who posted in it has also been blocked from the OpenCart repo.


Damian Bushong