Skip to content

Instantly share code, notes, and snippets.

View enko's full-sized avatar
🐉
🧙

Tim enko

🐉
🧙
View GitHub Profile
@enko
enko / modules.org
Created April 24, 2019 19:56
example modules org file with a table
{
"layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar at the bottom of your screen
"height": 60, // Waybar height
// "width": 1280, // Waybar width
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "battery", "clock", "tray"],
// Modules configuration
"sway/workspaces": {
#!/usr/bin/env -S deno --allow-run
import { decode } from "https://deno.land/std/strings/strings.ts";
import * as log from "https://deno.land/std/log/mod.ts";
function baseRandom(lower, upper) {
return lower + Math.floor(Math.random() * (upper - lower + 1));
}
async function main() {
font pango:Dank Mono:size 10
set $blue #285577
set $gray #333333
set $red #900000
input * xkb_layout "de"
input * xkb_variant "neo"
set $mod Mod4
[
{
"id": 3,
"name": "eDP-1",
"rect": {
"x": 0,
"y": 0,
"width": 1920,
"height": 1080
},
font pango:Dank Mono:size 10
set $blue #285577
set $gray #333333
set $red #900000
input * xkb_layout "de"
input * xkb_variant "neo"
set $mod Mod4
font pango:Dank Mono:size 10
set $mod Mod4
set $term kitty
set $menu rofi -show drun # dmenu_path | dmenu | xargs swaymsg exec
set $workspace_layout stacked
set $wsemacs emacs
set $wscomm comm
set $wsmusic music
(defconst win32p
(eq system-type 'windows-nt)
"Are we running on a WinTel system?")
(dolist (symbol-subgroup
'((#x2000 . #x2012) ;; General Punctuation
(#x2015 . #x2017)
#x201F
(#x2023 . #x202F)
(#x2031 . #x2038)
@enko
enko / xmonad.hs
Created September 21, 2018 12:29
{-# OPTIONS_GHC -W -fwarn-unused-imports #-}
import Control.Monad
import Data.Bits ((.|.))
import Data.Ratio
import Graphics.X11.Xlib
import System.Exit
import System.IO
import System.IO (hPutStrLn)
import XMonad
@enko
enko / base-api.controller.ts
Created March 20, 2018 14:37
Basic API example
import { Connection } from "typeorm";
export abstract class BaseApiController<T> {
protected classType: new () => T;
public static connection: Connection;
constructor(classType: new () => T) {
this.classType = classType;
}