Skip to content

Instantly share code, notes, and snippets.

View sonthonaxrk's full-sized avatar
👁️
Focusing

RK sonthonaxrk

👁️
Focusing
View GitHub Profile
@sonthonaxrk
sonthonaxrk / async_gui_kernel.py
Last active January 31, 2021 13:49
This IPython kernel can take GUI messages
import zmq
import sys
from typing import Any, Tuple
from tornado import gen
from ipykernel.ipkernel import IPythonKernel
from devtools import pformat
from ipykernel.kernelbase import (
CONTROL_PRIORITY, SHELL_PRIORITY, ABORT_PRIORITY
)
import re
import pampy
S3_MATCHING_RULES = {
re.compile("/(?P<Bucket>([^\\/]+))/(?P<Key>(.*))\\?restore"): {
"restore_object": {
"header": {},
"method": "POST",
"querystring": {},
@sonthonaxrk
sonthonaxrk / kubernetes-helm.rb
Created October 2, 2019 12:20
2.11.0 Helm Homebrew
class KubernetesHelm < Formula
desc "The Kubernetes package manager"
homepage "https://helm.sh/"
url "https://github.com/helm/helm.git",
:tag => "v2.11.0",
:revision => "2e55dbe1fdb5fdb96b75ff144a339489417b146b"
head "https://github.com/helm/helm.git"
bottle do
cellar :any_skip_relocation
((Mr|Ms|Dr|Sr)(\.)?)(?!\w)(\.)?
@sonthonaxrk
sonthonaxrk / .js
Last active October 28, 2015 17:35
sequential-async-recusive-baconjs-queue.js
var pages = new Bacon.Bus();
var next = $("#next").asEventStream('click').map(true);
var pageNo = 0;
pages.flatMapConcat(asyncFunction).zip(next).onValue(value => {
console.log(value);
pages.push(value);
});
@sonthonaxrk
sonthonaxrk / index.html
Last active October 27, 2015 21:42 — forked from anonymous/index.html
Fetching paginated data in order with BaconJS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https://rawgit.com/baconjs/bacon.js/master/dist/Bacon.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.8.0/lodash.js"></script>
</head>
<body>
<ul>
<li> HTML
<li> is not
<li> XML
</li>
@sonthonaxrk
sonthonaxrk / Contract Killer 3.md
Created September 30, 2015 03:54
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

(venv)[Me@MyApp]$ git push heroku master
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 677 bytes | 0 bytes/s, done.
Total 8 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Deleting 0 files matching .slugignore patterns.
const Search = React.createClass({
render() {
return (
<div ref="container" className={containerClasses}>
<div id="location_search" className={locationSearchClasses}>
<div className="input-group-element">
<input
onChange={this.onSearch}
value={this.state.searchText}