Skip to content

Instantly share code, notes, and snippets.

--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -504,6 +504,14 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
return set_error(serror, SCRIPT_ERR_MINIMALDATA);
}
stack.push_back(vchPushValue);
+ if ((flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) && opcode == OP_FALSE) {
+ auto pc_tmp = pc;
+ opcodetype next_opcode;
+ valtype dummy_data;
@tomwhoiscontrary
tomwhoiscontrary / install-concourse-on-ubuntu.sh
Created August 22, 2016 09:18
A shell script to install Concourse on a systemd-based Ubuntu using the plain binary
#! /bin/bash -eu
EXTERNAL_URL_HOST_NAME="$1"
ADMIN_USERNAME="$2"
ADMIN_PASSWORD="$3"
CONCOURSE_VERSION=${CONCOURSE_VERSION:-v1.1.0}
apt-get update
apt-get install -y postgresql postgresql-contrib
@squarism
squarism / iterm2.md
Last active September 19, 2024 20:28
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@henkmeulekamp
henkmeulekamp / pagerduty-daily-maintenance.ps1
Created July 7, 2014 15:07
Powershell script to create recurring maintenance windows in PagerDuty
param (
[int]$numberOfDaysForward = 365,
[string]$requesterId = "XXXXXXXXx", #pagerduty-userid
[string]$apiKey = "XXXXXXXXXXXXXXX", #pagerduty api-key
[string]$pagerdutyUrl = "https://XXXXXXX.pagerduty.com", #https://[account-name].pagerduty.com
[string]$description = "Daily Blackout Hours 2:30 to 4am", #description of maintenance window
[string]$serviceIDs="'XXXXXX', 'XXXXXX', 'XXXXXX'", #serviceIds of services to set in maintenance "'ABC123', 'ABC100', 'ABC101'"
[string]$start = "2014-07-07T02:30:00", # "yyyy-MM-ddTHH:mm:ss"
[string]$end = "2014-07-07T04:00:00" # "yyyy-MM-ddTHH:mm:ss"
)
@kyledrake
kyledrake / ferengi-plan.txt
Last active September 5, 2024 01:47
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@matejskubic
matejskubic / gist:10268126
Created April 9, 2014 13:06
Setup your IIS for SSL Perfect Forward Secrecy and TLS 1.2
### http://www.hass.de/content/setup-your-iis-ssl-perfect-forward-secrecy-and-tls-12
# Add and Enable SSL 3.0 for client and server SCHANNEL communications
md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0' -Force
md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server' -Force
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server' -name 'Enabled' -value '0xffffffff' -PropertyType 'DWord' -Force
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server' -name 'DisabledByDefault' -value 0 -PropertyType 'DWord' -Force
# Add and Enable TLS 1.0 for client and server SCHANNEL communications
md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0' -Force
@banaslee
banaslee / XGH - en.txt
Last active September 20, 2024 12:14
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Source: http://gohorseprocess.wordpress.com
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).
@funkjedi
funkjedi / StringScanner.php
Created August 28, 2011 17:41
Ruby corelib StringScanner ported to PHP
<?php
define('FLAG_MATCHED', 1 << 0);
class StringScanner implements ArrayAccess
{
protected
$str = '',
$len = 0,
$flags,