Skip to content

Instantly share code, notes, and snippets.

@pgdaniel
pgdaniel / index.html
Last active September 22, 2023 18:22 — forked from arscan/index.html
Basic Visualization
<html>
<h1>BLAH</h1>
</html>
@pgdaniel
pgdaniel / gist:f373d29970958b06876dc44a134e2426
Created January 12, 2022 23:21
Localstack SQS quickstart
pip3 install localstack
localstack start
pip3 install awscli-local
awslocal sqs create-queue --queue-name <queue-name>
awslocal --endpoint-url=http://localhost:4566 sqs receive-message --queue-url <url-from-create-queue-above>
@pgdaniel
pgdaniel / Github Fix.user.js
Created June 24, 2020 02:52
Github Old Layout Tampermonkey
// ==UserScript==
// @name Github Old Look
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://github.com/*
// @grant none
// @require http://code.jquery.com/jquery-3.4.1.min.js
// ==/UserScript==
@pgdaniel
pgdaniel / protocol.rb
Last active November 19, 2019 06:16
TCP binary protocol server/client (inspired/borrowed from https://gist.github.com/omnisis/3998752)
require 'bindata'
class CustomProtocol < BinData::Record
endian :big
stringz :command_word
uint32 :op1
uint32 :op2
end
@pgdaniel
pgdaniel / protocol.rb
Created November 19, 2019 05:57
Binary TCP Ruby server (inspired from ...)
require 'bindata'
class CustomProtocol < BinData::Record
endian :big
stringz :command_word
uint32 :op1
uint32 :op2
end
@pgdaniel
pgdaniel / protocol.rb
Created November 19, 2019 05:55 — forked from omnisis/protocol.rb
Ruby UDP Server/Client Pair with Custom Binary Protocol
require 'bindata'
class CustomProtocol < BinData::Record
endian :big
stringz :command_word
uint8 :op1
uint8 :op2
end
@pgdaniel
pgdaniel / wget.txt
Last active March 8, 2019 23:45
wget download
wget -e robots=off --mirror --convert-links --adjust-extension --page-requisites --no-parent <site to mirror>
@pgdaniel
pgdaniel / ruby_rm_updater.sh
Last active March 5, 2019 19:56
Update system
#sudo find . -iname *.rb -exec rm '{}' \;
@pgdaniel
pgdaniel / _breadcrumbs.html.erb
Created March 15, 2016 08:44
cheap breadcrumb view helper to use with wicked wizard and bootstrap (for laters)
<ol class="breadcrumb">
<%= generate_breadcrumbs %>
</ol>
using terms from application "Messages"
# The following are unused but need to be defined to avoid an error
on message sent theMessage with eventDescription
end message sent
on message received theMessage with eventDescription
end message received
on chat room message received with eventDescription