Skip to content

Instantly share code, notes, and snippets.

@pvik
pvik / smartparens-cheatsheet.md
Last active March 17, 2024 03:29
A Cheatsheet for Emacs Smarparens example configuration

An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.

Traversal

C-M-f sp-forward-sexp
C-M-b sp-backward-sexp
@pvik
pvik / i3status.conf
Created September 12, 2018 12:52
i3 status bar config
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
@pvik
pvik / color-doom.h
Created September 11, 2018 22:49
Doom Theme Colors for st (suckless terminal)
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] =
{
[0] = "#1c1f24", // black
[1] = "#ff6c6b", // dark red
[2] = "#98be65", // dark green
[3] = "#DA8548", // dark orange
[4] = "#51afef", // dark blue
This file has been truncated, but you can view the full file.
127.0.0.1 000001.ink
127.0.0.1 0001interac.com
127.0.0.1 00043138.com
127.0.0.1 00053138.com
127.0.0.1 00056789.com
127.0.0.1 00063138.com
127.0.0.1 000877009webmaster.000webhostapp.com
127.0.0.1 00093138.com
127.0.0.1 000jq3q.rxportalhosting.com
127.0.0.1 000lohc.wcomhost.com
let increasing (chr_lst : char list) =
List.fold_left
(fun last_int chr ->
if last_int >= 0 then
let chr_int = int_of_string (String.make 1 chr) in
if last_int <= chr_int then
chr_int
else
(-1)
else
let wire1 = ["R98" ; "U47" ; "R26" ; "D63" ; "R33" ; "U87" ; "L62" ; "D20" ; "R33" ; "U53" ; "R51"]
let wire2 = ["U98" ; "R91" ; "D20" ; "R16" ; "D67" ; "R40" ; "U7" ; "R15" ; "U6" ; "R7"]
type point = {
x : float ;
y : float
}
type line = {
p1 : point ;
(set-env!
:source-paths #{"src/scss" "src/clj" "src/cljs" "src/cljc"}
:resource-paths #{"html" "resources"}
:dependencies '[[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.520"]
;; server
[compojure "1.6.1"]
[ring/ring-core "1.7.1"]
[ring/ring-jetty-adapter "1.7.1"]
#!/usr/bin/python
print("hello from python")
@pvik
pvik / hibernate-on-low-battery.sh
Last active September 14, 2018 21:21
Hibernate on Low Battery, when acpi does not report proper battery status
#!/bin/sh
# Battery threshold below which, script will hibernate if discharging
batt_threshold=20
# temporary file to store the previous battery charge value, to determine if battery is being discharged
batt_charge_file="/tmp/batt_charge"
# read in batt charge from acpi
echo "`acpi -b`, `cat /tmp/batt_charge`%" | awk -F'[:,%]' '{print $2, $3, $5, ($5 - $3), ($3-$5)<0?"discharging":"powered"}' | {
read -r acpi_status capacity old_capacity capacity_diff status
@pvik
pvik / home.html
Last active September 12, 2018 12:37
custom homepage
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" href="favicon.png" />
<title>elric's home</title>
<!--link rel="stylesheet" href="style.css"-->
<style media="screen" type="text/css">
html {
font-family: Hack;
font-size: 16px;