Skip to content

Instantly share code, notes, and snippets.

Moe Aboulkheir moea

Block or report user

Report or block moea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View transaction.edn
;; I would suggest that we use either 'datopia' or 'datopia.db' as the namespace
;; for the schemas, rather than 'db'. For users, I suspect 'db' will seem arbitrary
;; and incongruous (as it does to me, in this context).
#:datopia {:attribute :datopia.ednt/balance
:schema #:db {:cardinality :db.cardinality/one
:valueType :db.type/bigdec}
:invariant <inline query graph as map of keyword -> query,
or maybe just inline query, initially. having
View input.clj
(ns stickler.core
(:require [clojure.java.io :as io]
[camel-snake-kebab.core :refer [->kebab-case]])
(:import [com.squareup.wire.schema Schema SchemaLoader ProtoType])
(:gen-class))
(def ^:dynamic package-renames {})
(def ^:dynamic ->field-name ->kebab-case)
(def ^:dynamic ->type-name ->kebab-case)
@moea
moea / 0.sh
Last active Oct 12, 2018
Machine Setup
View 0.sh
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
set -e
sudo add-apt-repository universe
apt-add-repository -y ppa:teejee2008/ppa
apt-get update
apt-get install -y ukuu
View example.py
import sys, rlp, leveldb
from ethereum import trie
db = leveldb.LevelDB('/tmp/xyz')
class X:
def get(self, a):
return db.Get(a)
def put(self, a, b):
View gist:876b3e73e5008cb58461b7cf4514ec0a
(let [bid-duration (t/days 10)
reveal-duration (t/days 12)]
(fsm
:store {high-bid 0
high-bidder nil
returns {}
created (from :time)}
:states [:bid (<= bid-duration (t/interval created (:time tx)))
:reveal (<= reveal-duration (t/interval created (:time tx)))
:finish
View gl.py
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
from PIL import Image
from PIL import ImageOps
import sys
width, height = 3840, 1920
View severless.yml
service: aws-polling-task-scheduler
provider:
name: aws
runtime: nodejs4.3
environment:
RATE: 300
TASK_TABLE: ${self:service}-${opt:stage, self:provider.stage}-tasks
TOKEN_INDEX: ${self:service}-${opt:stage, self:provider.stage}-tasks-by-token
iamRoleStatements:
View x.sh
#!/usr/bin/env bash
set -e -o pipefail
API_NAME=
SLACK_TOKEN=
while [[ 1 < $# ]]; do
key="$1"
case $key in
@moea
moea / nginx.config
Created Feb 11, 2016
Place in .ebextensions to increase Nginx timeout in a non-Docker AWS Elastic Beanstalk Worker Environment
View nginx.config
files:
"/tmp/proxy.conf":
mode: "000644"
owner: root
group: root
content: |
proxy_send_timeout 1200;
proxy_read_timeout 1200;
send_timeout 1200;
View MainActivity.java
package io.nervous.alarmtest;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.os.SystemClock;
You can’t perform that action at this time.