Skip to content

Instantly share code, notes, and snippets.

View dlight's full-sized avatar

Elias Gabriel Amaral da Silva dlight

View GitHub Profile
@dlight
dlight / README
Last active February 12, 2017 20:39
This folder was created to store external luks headers, without which
the encrypted disks CAN NOT BE OPENED.
Losing such headers means DATA ON ENCRYPTED DISKS WILL BE LOST. So
backup them in other places.
Also this stores some minor backup of metadata like the layout of
partition tables.
Also what commands I ran (if I remember) so that I can more easily
module Complete where
import Data.List (transpose, intercalate)
{-
Neste código, a tabela verdade
p0 p1 ... pn
0 0 ... 0 | X0 |
CC = gcc
CFLAGS = -std=c99 -pedantic -Wall -lm
TARGETS = teste nanicolina
all:: $(TARGETS)
$(TARGETS): %: %.c
$(CC) $(CFLAGS) -o $@ $<
#!/bin/bash
. $(dirname $(realpath $0))/lib.sh
[[ $# -lt 1 ]] && echo ERRO: yt-step chamado sem parâmetro && exit 1
file=$(realpath $1)
lock=$controld/lock/$(basename $file)
mkdir -p $lock
module Logic where
import Data.List (transpose, intercalate)
{-
Neste código, a tabela verdade
p0 p1 ... pn
0 0 ... 0 | X0 |
module Hello exposing (..)
import Html exposing (Html, program, li, ul, div, text, button, input)
import Html.Events exposing (onClick, onInput)
import Html.Events.Extra exposing (onEnter)
import RemoteData exposing (WebData)
import Http
type alias Model =
@dlight
dlight / rust.el
Created September 15, 2017 21:19
;(require 'racer)
;(setq racer-cmd "~/.cargo/bin/racer")
;(setq racer-rust-src-path "/usr/src/rust")
(eval-after-load "rust-mode" '(require 'racer))
(add-hook 'rust-mode-hook #'my-rust-mode-hook)
(add-hook 'racer-mode-hook #'eldoc-mode)
(defun my-rust-mode-hook ()
@dlight
dlight / minha_coisinha.el
Last active February 12, 2018 02:50
coisinha q eu fiz pra mudar de buffer
(defun keys (a)
(when a
(global-set-key (read-kbd-macro (nth 0 a)) (nth 1 a))
(keys (cddr a))))
(keys '("<s-left>" my-previous-buffer
"<s-right>" my-next-buffer
"<s-up>" next-regular-buffer
"<s-down>" previous-star-buffer))
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 <sinkId/sinkName>" >&2
echo "Valid sinks:" >&2
pactl list short sinks >&2
exit 1
fi
newSink="$1"
@dlight
dlight / play.sh
Created July 10, 2018 21:16
the command name is actually ,
#!/bin/sh
#export DRI_PRIME=1
cmd=mpv
param='-fs --msg-level=all=no,cplayer=info'
filter='/Playing/!d; s/^Playing: //'
order='%C@' # by default, order by ctime