Skip to content

Instantly share code, notes, and snippets.

View necrogami's full-sized avatar

Anton C. Swartz IV necrogami

View GitHub Profile
@necrogami
necrogami / cors.conf
Last active June 7, 2018 15:40
Dynamic nginx config from my mac.
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS, HEAD';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
<?php
namespace Titan\Model;
use Titan\Model\TitanModel;
use Illuminate\Database\Eloquent\Model;
use Titan\Model\JsonTransformer\Company as Transformer;
use Titan\Model\Address;
class Company extends Model
Hello, would you like to hear a TCP joke?
Yes, I'd like to hear a TCP joke.
OK, I'll tell you a TCP joke.
OK, I'll hear a TCP joke.
Are you ready to hear a TCP joke?
Yes, I am ready to hear a TCP joke.
OK, I'm about to send the TCP joke. It will last 10 seconds, it has two characters, it does not have a setting, it ends with a punchline.
OK, I'm ready to hear the TCP joke that will last 10 seconds, has two characters, does not have a setting and will end with a punchline.
I'm sorry, your connection has timed out... ...Hello, would you like to hear a TCP joke?
#!/usr/bin/perl -w
#
# Copyright (c) 2002-2005 David Rudie
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
<?php
while (true) {
$json = file_get_contents('https://api.twitch.tv/kraken/channels/kiwifails');
$object = json_decode($json);
echo $object->partner.PHP_EOL;
if ($object->partner) {
exec("echo \"kiwi fails is now a partner go subscribe\" |cscript //nologo \"C:\Program Files\Jampal\ptts.vbs\"");
}
sleep(45);
}
Do {
$partner = (C:\ProgramData\chocolatey\bin\curl.exe -ks https://api.twitch.tv/kraken/channels/kiwifails | jq .partner)
echo $partner
if ($partner -eq "true") {
echo "KIWI IS A PARTNER!!!!!!!"
echo "kiwi fails is now a partner go subscribe" | cscript //nologo "C:\Program Files\Jampal\ptts.vbs"
}
sleep 30
} While (1 -eq 1)
ABSOLUTELY NO GLOWING SCREENS UNTIL:
You have read real text (not comics) for at least 25 minutes
All your homework is done (one item may wait until morning with approval from Mom/Dad)
You have marked the calendar with any upcoming tests or deadlines, and made an appointment to study with Mom/Dad
You have done something creative, active, or productive for at least 45 minutes
Your bed is made and your room is tidy
You have done at least one chore (see chore list below)
And here’s the chore list:
PICK A CHORE:

[NotepadLet @ 1.299em Line Spacing](data:text/html;base64,PGh0bWwgb25jbGljaz0iIiBjbGFzcz0iIj48aGVhZD48dGl0bGU+Tm90ZXBhZGxldCAtIFVudGl0bGVkCjwvdGl0bGU+CjxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsIGluaXRpYWwtc2NhbGU9MS4wIj4KCgoKPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KaHRtbCB7CiAgICBwYWRkaW5nOiAwcHggNXB4IDQwcHg7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjRUVFOwogICAgYmFja2dyb3VuZC1pbWFnZTogcmVwZWF0aW5nLWxpbmVhci1ncmFkaWVudCg0NWRlZywgdHJhbnNwYXJlbnQgNXB4LCBoc2xhKDE5NywgNjIlLCAxMSUsIDAuNSkgNXB4LCBoc2xhKDE5NywgNjIlLCAxMSUsIDAuNSkgMTBweCwgaHNsYSg1LCA1MyUsIDYzJSwgMCkgMTBweCwgaHNsYSg1LCA1MyUsIDYzJSwgMCkgMzVweCwgaHNsYSg1LCA1MyUsIDYzJSwgMC41KSAzNXB4LCBoc2xhKDUsIDUzJSwgNjMlLCAwLjUpIDQwcHgsIGhzbGEoMTk3LCA2MiUsIDExJSwgMC41KSA0MHB4LCBoc2xhKDE5NywgNjIlLCAxMSUsIDAuNSkgNTBweCwgaHNsYSgxOTcsIDYyJSwgMTElLCAwKSA1MHB4LCBoc2xhKDE5NywgNjIlLCAxMSUsIDApIDYwcHgsIGhzbGEoNSwgNTMlLCA2MyUsIDAuNSkgNjBweCwgaHNsYSg1LCA1MyUsIDYzJSwgMC41KSA3MHB4LCBoc2xhKDM1LCA5MSUsIDY1JSwgMC41KSA3MHB4LCBoc2xhKDM1LCA5MSUsIDY1JSwgMC41KSA4MHB4LCBoc2xhKDM1LCA5MS

Keybase proof

I hereby claim:

  • I am necrogami on github.
  • I am necrogami (https://keybase.io/necrogami) on keybase.
  • I have a public key whose fingerprint is 4F42 CB8D 8260 7EA0 A737 13C5 A9BF 9D59 1906 0136

To claim this, I am signing this object:

@necrogami
necrogami / check.sh
Last active November 11, 2016 15:31
#!/bin/bash
if [ ! -f state ]; then
echo "File not found!"
echo "STATE=false" > state
fi
source state
if [ $STATE = true ] ; then