Skip to content

Instantly share code, notes, and snippets.

View robert-claypool's full-sized avatar
💥
Breaking Things

Robert Claypool robert-claypool

💥
Breaking Things
View GitHub Profile
{
"name": "Blob Fail Workflow",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
240,
@robert-claypool
robert-claypool / blockstack.txt
Created June 18, 2019 19:20
Blockstack Verification
Verifying that "robert_claypool.id" is my Blockstack ID. https://explorer.blockstack.org/name/robert_claypool.id
@robert-claypool
robert-claypool / CORS.md
Created February 19, 2019 22:28
Understanding CORS

"Whenever I start thinking about CORS, my intuition about which site hosts the headers is incorrect, just as you described in your question. For me, it helps to think about the purpose of the same origin policy.

The purpose of the same origin policy is to protect you from malicious JavaScript on siteA.com accessing private information you've chosen to share only with siteB.com. Without the same origin policy, JavaScript written by the authors of siteA.com could make your browser make requests to siteB.com, using your authentication cookies for siteB.com. In this way, siteA.com could steal the secret information you share with siteB.com.

Sometimes you need to work cross domain, which is where CORS comes in. CORS relaxes the same origin policy for domainA.com, using the Access-Control-Allow-Origin header to list other domains (domainB.com) that are trusted

The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets:

10.0.0.0     -  10.255.255.255  (10/8 prefix)
172.16.0.0   -  172.31.255.255  (172.16/12 prefix)
192.168.0.0  -  192.168.255.255 (192.168/16 prefix)

We will refer to the first block as "24-bit block", the second as

Keybase proof

I hereby claim:

  • I am robert-claypool on github.
  • I am robert_claypool (https://keybase.io/robert_claypool) on keybase.
  • I have a public key whose fingerprint is 3606 A66E CA1C 3107 DFED 32DF 6AF2 BF57 992F 19ED

To claim this, I am signing this object:

@robert-claypool
robert-claypool / hmac-signed-timestamps.md
Last active July 13, 2018 02:31
HMAC Signed Timestamps For PostgreSQL
-- This requires https://www.postgresql.org/docs/8.3/static/pgcrypto.html
-- A `sync_stamp` is our current database time with HMAC sig.
-- The dot "." separates data and sig as with https://jwt.io/
-- Unlike JWT, the sig is not base64 encoded.
SELECT to_char(CURRENT_TIMESTAMP, 'YYYYMMDDHH24MISSUS')
    || '.'
    || hmac(to_char(CURRENT_TIMESTAMP, 'YYYYMMDDHH24MISSUS'), 'SUPER-DUPER-SECRET', 'md5')
    as sync_stamp;
-- 20180712215107309054.\xaf330cffa927bd496c153e09b559c71d
@robert-claypool
robert-claypool / settings.json
Last active February 12, 2019 04:50
VS Code User Settings
{
"editor.fontSize": 12,
"editor.rulers": [80],
"vim.insertModeKeyBindings": [
{
"before": ["j", "j"],
"after": ["<Esc>"]
}
],
@robert-claypool
robert-claypool / building-vim-from-source.md
Last active August 24, 2022 07:27
Building Vim from Source

Assumes that Python2, Python3, and Lua are installed...

git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge \
            --enable-pythoninterp=yes \
            --enable-python3interp=yes \
            --enable-luainterp=yes
make
sudo make install
@robert-claypool
robert-claypool / carto-links.md
Last active October 17, 2019 05:19
CartoDB Examples & Docs
@robert-claypool
robert-claypool / toggle-hyper-v.md
Created December 5, 2016 22:22
Make Room for VirtualBox: Toggle Hyper-V On/Off

I tried running these commands in PowerShell, but bcdedit commands would not work even as Admin.

bcdedit /copy {current} /d "No Hyper-V" 
# The entry was successfully copied to {01afc27f-do-not-use-5e2f3b11ce9a}. 

bcdedit /set {01afc27f-do-not-use-5e2f3b11ce9a} hypervisorlaunchtype off 
# The operation completed successfully.