Skip to content

Instantly share code, notes, and snippets.

View clsource's full-sized avatar
💻
🥷🏼

Camilo clsource

💻
🥷🏼
View GitHub Profile
@cute
cute / JavaScriptCore+fetch.swift
Created April 26, 2019 22:59 — forked from yycking/JavaScriptCore+fetch.swift
add fetch, console.log and Promise.then/catch to JavaScriptCore on iOS/Mac
import JavaScriptCore
extension JSContext {
subscript(key: String) -> Any {
get {
return self.objectForKeyedSubscript(key)
}
set{
self.setObject(newValue, forKeyedSubscript: key as NSCopying & NSObjectProtocol)
}
@pklaus
pklaus / ddnsserver.py
Last active February 27, 2024 11:41 — forked from andreif/Simple DNS server (UDP and TCP) in Python using dnslib.py
Simple DNS server (UDP and TCP) in Python using dnslib.py
#!/usr/bin/env python
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import argparse
import datetime
import sys
import time
import threading
@markblundeberg
markblundeberg / pgp-checkdatasig.md
Created August 31, 2018 01:23
Using PGP signatures with bitcoin script OP_CHECKDATASIG

Using PGP signatures with bitcoin script OP_CHECKDATASIG

Dr. Mark B. Lundeberg, 2018 August 30 bitcoincash:qqy9myvyt7qffgye5a2mn2vn8ry95qm6asy40ptgx2

Since version 2.1, GnuPG is able to use the very same secp256k1 elliptic curve signature algorithm (ECDSA) as used in bitcoin. Quite soon Bitcoin Cash will add a new script opcode OP_CHECKDATASIG that is able to check signatures not just on the containing transaction, but also on arbitrary data. For fun, let's try to intersect the two signature systems and see what can be done!

Background

OP_CHECKDATASIG signatures

@olivierlacan
olivierlacan / gist:4062929
Last active February 10, 2024 10:57 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
def time_ago_in_words(seconds) do
minutes = round(seconds/60)
case minutes do
minutes when minutes in 0..1 ->
case seconds do
seconds when seconds in 0..4 ->
"less than 5 seconds"
seconds when seconds in 5..9 ->
"less than 10 seconds"
@dhkatz
dhkatz / msys2-visual-studio-code.md
Last active January 28, 2024 21:37
Using MSYS2 with Visual Studio Code

Using MSYS2 with Visual Studio Code is extremely easy now thanks to the Shell Launcher extension by Tyriar.

First, install the extension and reload Visual Studio Code.

Then, open the settings.json to edit your settings.

Add the field shellLauncher.shells.windows. I recommend using autocompletion here so that all the default shells are added.

You should having something like this now:

@demidovakatya
demidovakatya / anime.md
Last active January 17, 2024 09:33
telegram stickers // anime
@unbug
unbug / Middleware.js
Last active January 6, 2024 04:17
Powerful Javascript Middleware Pattern Implementation, apply middleweares to any object. https://unbug.github.io/js-middleware/
'use strict';
/* eslint-disable consistent-this */
let middlewareManagerHash = [];
/**
* Composes single-argument functions from right to left. The rightmost
* function can take multiple arguments as it provides the signature for
* the resulting composite function.
*
@fschuindt
fschuindt / elixir_notes.md
Last active December 15, 2023 22:32
My personal study notes on Elixir. It's basically a resume of http://elixir-lang.org/getting-started/ (Almost everything is copied). Still working on it!
@keplersj
keplersj / logged.rs
Created July 25, 2015 21:00
Gist demonstrating the ability to run Crystal code from Rust.
#[link(name = "logger")]
extern {
fn CrystalLog(text: *const u8);
}
fn log(text: &'static str) {
unsafe{ CrystalLog(text.as_bytes().as_ptr()) };
}
fn main() {