Skip to content

Instantly share code, notes, and snippets.

View yookoala's full-sized avatar

Koala Yeung yookoala

  • Pixel Action Studio
  • Hong Kong
  • 19:04 (UTC +08:00)
View GitHub Profile
@yookoala
yookoala / journalctl-gnome-shell.log
Created November 7, 2017 15:29
gnome-shell log trace
Nov 07 23:21:10 localhost gnome-shell[3394]: JS WARNING: [resource:///org/gnome/shell/ui/main.js 315]: reference to undefined property "MetaStage"
Nov 07 23:21:10 localhost gnome-shell[3394]: JS WARNING: [resource:///org/gnome/shell/ui/layout.js 221]: reference to undefined property "MetaWindowGroup"
Nov 07 23:21:10 localhost gnome-shell[3394]: JS WARNING: [resource:///org/gnome/shell/ui/osdMonitorLabeler.js 59]: reference to undefined property "MetaDBusDisplayConfigSkeleton"
Nov 07 23:21:10 localhost org.gnome.Shell.desktop[3394]: current session already has an ibus-daemon.
Nov 07 23:21:10 localhost gnome-shell[3394]: JS WARNING: [resource:///org/gnome/shell/ui/slider.js 38]: reference to undefined property "CallyActor"
Nov 07 23:21:10 localhost gnome-shell[3394]: Telepathy is not available, chat integration will be disabled.
Nov 07 23:21:10 localhost gnome-shell[3394]: JS WARNING: [resource:///org/gnome/gjs/modules/tweener/tweener.js 540]: reference to undefined property "isSpecialProperty"
Nov 07 23:21:11
@yookoala
yookoala / gist:713aa101cd8ac00bbc7e4a6966979f8e
Created November 17, 2017 03:24
dummyChannel timeout in test log
== RUN TestWebsocketChan_Broadcast
2017/11/16 08:50:26 timeout
2017/11/16 08:50:26 timeout
2017/11/16 08:50:26 timeout
2017/11/16 08:50:26 timeout
@yookoala
yookoala / tick5.spec
Last active July 26, 2018 05:57
RPM SPEC file for tick5
# Some metadata required by an RPM package
Name: tick5
Summary: Print a message every 5s
Version: 0.1
Release: 1
License: MIT
%description
tick5 is a simple useless script that echos a message every 5 seconds.
@yookoala
yookoala / tick5.service
Last active July 26, 2018 06:35
systemd unit file for tick5.service
[Unit]
StopWhenUnneeded=true
[Install]
WantedBy=multi-user.target
[Service]
ExecStart=/usr/bin/tick5
Restart=always
RestartSec=5
@yookoala
yookoala / control
Last active July 26, 2018 11:11
A debian package control file example
Package: tick5
Maintainer: Koala Yeung
Architecture: all
Version: 0.1
Description: Print a message every 5s
.
tick5 is a simple useless script that echos a message every 5 seconds.
@yookoala
yookoala / tick5
Last active July 27, 2018 12:57
A very simple bash script for fun.
#!/bin/bash
# say something, with timestamp, every 5 seconds
while echo "$@"; do
sleep 5s
done
@yookoala
yookoala / http_build_attribute.php
Last active August 24, 2018 10:28
Build HTML tag attributes with a given array.
<?php
/**
* Build HTML tag attributes string with a given array.
*
* Usage Example:
* echo '<img ' . http_build_attributes([
* 'src' => 'some-image-url',
* 'class' => ['img-responsive', 'decorative'],
* ]);
@yookoala
yookoala / index.php
Created September 26, 2018 08:20
FormData javascript API test
<?php
/**
* A very simple test of FormData API with a very simple
* PHP backend.
*
* Usage:
*
* 1. Save this file to a folder.
* 2. Open your terminal and cd to this folder.
@yookoala
yookoala / Makefile
Last active November 9, 2018 16:54
PHP Translaion String Extraction with xgettext
all: messages.po
clean:
rm -f messages.po
.PHONY: all clean
messages.po:
xgettext \
--language=PHP \
@yookoala
yookoala / composer.json
Last active November 17, 2018 01:45
HTMLPurifier add support to details and summary
{
"name": "yookoala/htmlpurifier-example",
"authors": [
{
"name": "Koala Yeung",
"email": "koalay at gmail dot com"
}
],
"require": {
"ezyang/htmlpurifier": "^4.10"