Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 18, 2024 08:32
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bjoernQ
bjoernQ / AndroidManifest.xml
Created October 14, 2013 13:02
Creating a System Overlay (Always on Top over all Apps) in Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.mobilej.overlay"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application android:label="SystemOverlay" >
<activity
@bhauman
bhauman / README.md
Last active December 3, 2019 16:43
ClojureScript minimal dev and prod setup.

Recent improvements to the ClojureScript compiler have greatly simplified setting up development versus production outputs.

This example uses Figwheel as something that you want to exclude for production, but the pattern is general.

With this simple setup you only need one html file/view and it will work for developement and production.

@coyotespike
coyotespike / cljs-CSRF
Created June 25, 2015 16:49
CSRF in Clojure/ClojureScript
;; There are three parts to the problem:
;; (1) putting the token on the page on the server-side,
;; (2) getting it off on the client-side,
;; (3) and then POST-ing it with the request.
;;;; One could also GET and then POST using a route, but that makes the CSRF token useless.
; 1. Putting the token on the page.
; handler.clj
(require '[datascript.btset :as btset])
(require '[datascript.arrays :as da])
;; What?
;; Fast equality check for btset/Iter
;;
;; Why?
;; There's no history or (d/since ) API and I want to know what's changed between two databases.
;; With fast Iter equality checks, I can quickly check if an attribute has changed between
;; my two database values like so: