Skip to content

Instantly share code, notes, and snippets.

View Siliconrob's full-sized avatar
🌎
🙈 🙉 🙊

Robin Michael Siliconrob

🌎
🙈 🙉 🙊
View GitHub Profile
@queerviolet
queerviolet / cell.ts
Created January 10, 2020 17:46
a cellular reactive framework
export const Source_outputs = Symbol('Cell outputs')
export const Sink_inputs = Symbol('Cell inputs')
export const Source_willOpen = Symbol('Source will attach its first output')
export const Source_didClose = Symbol('Source did detach its last output')
export const Sink_willOpen = Symbol('Sink did attach its first input')
export const Sink_didClose = Symbol('Sink did detach its last input')
export const Sink_update = Symbol('Sink update')
@micahhausler
micahhausler / jq-filter.sh
Last active September 21, 2023 07:27
GitHub collaborator finder
# Go to https://developer.github.com/v4/explorer/ and enter the graphql query with the query veriable:
# {"queryString": "your-githubuser-name"}
cat results.json |
jq '.data.user.repositories.edges[] | { Count: .node.collaborators.totalCount, Repo: .node.name} | select(.Count > 2)'
@adymitruk
adymitruk / trello-cqrs-es.fish
Last active October 23, 2023 20:19
Trello in CQRS/ES in fish shell
#set up the dir structure if it doesn't exist
set t ~/.trello; mkdir -p $t
function if_exist # we don't want to litter our code with ifs if a read model or events are not there yet. Return /dev/nul for empty
if test -e $t/$argv[1]; echo $t/$argv[1]; else; echo /dev/null; end
end
function list # provide lists from our tab delimited entries with filtering and line item numbers to make choices
set list $argv[1]; set column_to_show $argv[2]; set filter $argv[3]; set count 1
cat (if_exist $list) | grep -e "$filter\$" | while read line
set -l line_items (string split \t $line)
echo $count\) $line_items[$column_to_show]
@rtyler
rtyler / upload-to-azure.sh
Created January 4, 2018 19:22
A bash script which supports uploading blobs to Azure Storage: ./upload-to-azure.sh [filename]
#!/usr/bin/env bash
FILENAME=${1}
# expected to be defined in the environment
# - AZURE_STORAGE_ACCOUNT
# - AZURE_CONTAINER_NAME
# - AZURE_ACCESS_KEY
# inspired by
@anaisbetts
anaisbetts / Example.cs
Created August 28, 2017 05:15
Observe changes to top-level windows
var watchThatWindow = new ObservableWindow();
watchThatWindow.WindowCreated
.Select(hwnd => NativeMethods.GetWindowTitle(hwnd))
.Subscribe(x => Console.WriteLine($"Say hello to '{x}'!"));
@nathan-osman
nathan-osman / win32.go
Last active August 31, 2023 22:01
Simple Windows GUI application written in Go
package main
import (
"log"
"syscall"
"unsafe"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
@glenrobertson
glenrobertson / TileLayer.GeoJSON.js
Last active August 2, 2021 07:11
Leaflet GeoJSON Tile Layer Example
// Load data tiles from an AJAX data source
L.TileLayer.Ajax = L.TileLayer.extend({
_requests: [],
_addTile: function (tilePoint) {
var tile = { datum: null, processed: false };
this._tiles[tilePoint.x + ':' + tilePoint.y] = tile;
this._loadTile(tile, tilePoint);
},
// XMLHttpRequest handler; closure over the XHR object, the layer, and the tile
_xhrHandler: function (req, layer, tile, tilePoint) {
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Reactive.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@davej
davej / delete_all_tweets.py
Last active March 27, 2024 03:12
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
"""
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at https://dev.twitter.com/apps
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1)