Skip to content

Instantly share code, notes, and snippets.

View lunaroyster's full-sized avatar

Arnav Bansal lunaroyster

View GitHub Profile
@lava
lava / tls_reverse_shell.md
Created February 24, 2020 17:59
CI Debugging with a TLS reverse shell

Interactive Debugging on Github Actions

Did you ever run into some issue where a job would behave slightly different in you CI environment than on your local machine? Did you ever wish you could run just a few commands in a shell on your build machine?

These are, of course rhetorical questions. And if you're using Github Actions to run your CI jobs, you'll have noticed that this use case is not supported at all. Can't create a nice walled garden if anyone could just run a CI job, after all. There are some workarounds (e.g. https://github.com/nektos/act), but since they're not officially supported they can be a bit unstable. Also, even they usually don't reproduce the exact environment found on github's servers.

// POLYFILLS
// Event.composedPath
// Possibly normalize to add window to Safari's chain, as it does not?
(function(E, d, w) {
if(!E.composedPath) {
E.composedPath = function() {
if (this.path) {
return this.path;
}
var target = this.target;

The new Bitcoin Cash address format ("Cash Address")

On ~January 14, the Bitcoin Cash clients will (we expect huge adoption) switch to the new Cash Address address format.

Related to Bech32?

Bech32 is the name of the address format proposed by Core developers (for SegWit addresses,BIP 173. It consists of 32 different characters, and "Bech" sounds like "Base" while keeping the error-correction algorithm "BCH" (or Bitcoin Cash ticker!) in mind. Bitcoin Cash will use a slightly different Bech32 address format, which is called "Cash Address".

So what?

Keybase proof

I hereby claim:

  • I am thel3l on github.
  • I am thel3l (https://keybase.io/thel3l) on keybase.
  • I have a public key whose fingerprint is B31B 7D96 BFC5 C027 134E 7051 1E72 8F19 348C 5779

To claim this, I am signing this object:

@lunaroyster
lunaroyster / Vector.js
Created November 25, 2017 19:37
A minimalist (amateur) implementation of 'Vector', along with cosineSimilarity
class Vector {
constructor(VectorArray) {
//TODO: Check things?
this._values = VectorArray;
}
toArray() {
return this._values;
}
get length() {
return this._values.length;
@lunaroyster
lunaroyster / TickGenerator.js
Created August 30, 2017 15:59
Generates ticks. Adjust tick length. Start and stop generator.
var on = function(name, handler) {
if(this._events.hasOwnProperty(name)) {
this._events[name].push(handler);
}
else {
this._events[name] = [handler];
}
};
var invoke = function(name, args) {
var res = [];
anonymous
anonymous / Stringlengthsort.py
Created August 17, 2017 08:41
print sorted(input("Enter your Strings: "), key=lambda string: len(string))
@Namek
Namek / app.ts
Created January 23, 2016 01:29
Angular 2 directive: two-way binding to contenteditable
@Component({
selector: 'test-component'
})
@View({
directives: [ContenteditableModel]
template: `
<h1 contenteditable="true" [(contenteditableModel)]="someObj.someProperty"></h1>
{{someObj | json}}
`
})
@manigandham
manigandham / rich-text-html-editors.md
Last active June 10, 2024 15:49
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

@roachhd
roachhd / README.md
Last active July 18, 2024 07:24
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION