Skip to content

Instantly share code, notes, and snippets.

View cjgk's full-sized avatar

Jonas Hässel cjgk

View GitHub Profile
$ go run bugrit.go
Listening on 0.0.0.0:9000
(main.Session) {
Id: (int) 12,
Stack: ([]main.StackRecord) (len=1 cap=1) {
(main.StackRecord) {
Level: (int) 0,
Type: (string) (len=4) "file",
Fname: (string) (len=30) "file:///var/www/html/index.php",
Line: (int) 0,
<?php
$payload = file_get_contents('php://input');
file_put_contents('divido_update.log', var_export(json_decode($payload), true), FILE_APPEND);
@cjgk
cjgk / keybase.md
Last active September 10, 2020 12:14

Keybase proof

I hereby claim:

  • I am cjgk on github.
  • I am jonashassel (https://keybase.io/jonashassel) on keybase.
  • I have a public key ASB2L_FAL4ZBjBR3BmdUZiBhiv-aorVjEUuvzdOAvGkYuQo

To claim this, I am signing this object:

<?php
$cssbg = get_template_directory_uri() . '/img/annons-hero.png';
$this_id = get_the_id();
if ( has_post_thumbnail($this_id) ) {
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($this_id), 'ws-cover' );
$thumb_url = $thumb['0'];
$cssbg = $thumb_url;
}
?>
<section class="header-section" style="background:url('<?php echo $cssbg; ?>') top center no-repeat; padding-bottom: 52%; background-size:cover;">
@cjgk
cjgk / Diamond
Last active August 29, 2015 14:15
for n in 1 2 3 4 5 4 3 2 1; do
for x in $(eval echo {1..$((6-n))}); do printf '-'; done
for x in $(eval echo {1..$n}); do printf '++'; done
for x in $(eval echo {1..$((6-n))}); do printf '-'; done
echo '';
done
bgjobs() {
joblist=`jobs | awk 'IF NR > 1 {printf ", " } {printf "'${tr_blue}'%s'${t_reset}'", $3}'`
[ -n "$joblist" ] && echo "("$joblist")"
}
create table users (
id serial primary key,
deleted boolean,
email_address text unique not null,
name text not null,
password text not null
);
create type game_status as enum ('new', 'creating', 'ongoing', 'ended');
create table games (
@cjgk
cjgk / Layout.json
Last active December 18, 2015 12:08
{
className: "UsageReportingExhortation",
humanName: "Redovisningsanmodan",
metadata: [
{
date: "2013-07-12",
daysToReminder: 14
}
],
inputs: [