Skip to content

Instantly share code, notes, and snippets.

View okeyokoro's full-sized avatar

Daniel Okey-Okoro okeyokoro

View GitHub Profile
@ducaale
ducaale / piping-experiments.js
Last active July 7, 2020 20:41
Using ES6 Proxies to turn methods into pipe friendly functions
// .babelrc
// {"plugins": [["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }]]}
const pipeable = (class_) => new Proxy({}, {
get: (target, prop) => (
(prop in class_.prototype)
? (...args) => (receiver) => class_.prototype[prop].call(receiver, ...args)
: class_[prop].bind(class_) // https://stackoverflow.com/a/30819436/5915221
)
});
{
"name": "rsms dark v2 mono",
"author": "rsms",
"variables": {
"red": "hsl(5, 0%, 50%)",
"orange": "hsl(27, 0%, 50%)",
"yellow": "hsl(60, 0%, 50%)",
"green": "hsl(150, 0%, 43%)",
"cyan": "hsl(180, 0%, 50%)",
"blue": "hsl(210, 0%, 50%)",
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active July 20, 2024 15:07
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@bucho666
bucho666 / class.nim
Last active July 26, 2024 22:01
nim class macro
import macros
proc typeName(head: NimNode): NimNode =
if head.len == 0: head else: head[1]
proc baseName(head: NimNode): NimNode =
if head.len == 0: newIdentNode("RootObj") else: head[2]
proc isObjectDef(head: NimNode): bool =
head.len == 0 or head[2].kind == nnkIdent
@stepney141
stepney141 / BookmarkAPI_en.md
Last active April 4, 2023 01:45
(DEPRECATED) Twitter Undocumented Endpoints for Bookmark

Unusual Shapes

Ask any of my friends, and they'll tell you I'm a big fan of shapes. Here are some of my all time favorites:

  • The circle
  • The hexagon
  • The triangle
  • The 'play button' (a triangle on its side)
  • The square
  • The fast square (a skewed square)
@npearce
npearce / install-docker.md
Last active July 27, 2024 07:34
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
import collections
class SimpleTree(collections.defaultdict):
"""
>>> tree = SimpleTree()
>>> tree.add(keys=("1",), value="value 1")
>>> tree.add(keys=("2a", "2b"), value="value 2.1")
#!/bin/bash
# Copyright (C) InnoviData GmbH <http://www.innovidata.com>, 2011.
# Author: Holger Widmann <holger.widmann@innovidata.com>
# Version: 1.2.20110610
#
# License:
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (LGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
@Adeohluwa
Adeohluwa / scraper.nim
Last active August 7, 2022 21:10
Scraper Written IN Nim
#!/usr/bin/env nimcr
# website is https so compile with nim c -r --threads:on -d:ssl bizlist_scraper.nim
import httpclient, htmlparser, os, threadpool,
system, strutils, re, strtabs, sequtils,
xmltree, nimquery, streams, csvtools, tables
# create a directory for each industry