This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function libgen-url --description 'generate a libgen search url from the passed in string' | |
echo 'https://libgen.is/search.php?req='(string escape --style=url (string join ' ' $argv))'&lg_topic=libgen&open=0&view=simple&res=25&phrase=1&column=def' | |
end | |
function libgen | |
lynx (libgen-url $argv) | |
end | |
function libgen-download | |
set download_options (string split ' ' (curl -XGET (libgen-url $argv) 2>/dev/null | grep -o '<a.*\[1\]</a>' | grep -o 'http[^\'"]\+')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// Usage: | |
// copy this code to https://replit.com/languages/go | |
// and change the encrypted_password variable below (see comments below for steps to acquite the encrypted password) | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"encoding/base64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eux | |
width=${1:-2560} | |
height=${2:-1080} | |
newresandrate="$width $height 60" | |
modeline=`cvt $newresandrate | grep Modeline | sed 's/Modeline //g'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function git_status() { | |
if git status >/dev/null 2>/dev/null; then | |
status_str=`git status -s 2>/dev/null | cut -f1 -d' ' | uniq -c | awk '{ print $2 " " $1 }' | paste -s -d' '` | |
branch=`git branch --show-current` | |
commit_hash=`git log -1 --format=%h` | |
echo "[git: $commit_hash $branch $status_str]" | |
fi | |
} | |
# important (!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:wine/wine-builds && sudo apt-get update && sudo apt-get install --install-recommends winehq-devel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# run this script using the | |
# wget -O - "https://gist.github.com/palesz/4a1d11df096a1bcd852878dc5e13b9ef/raw" | sh | |
# command | |
# change scale factor | |
dconf write /com/ubuntu/user-interface/scale-factor "{'eDP1': 13}" | |
# enable multiverse | |
sudo apt-add-repository multiverse && sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Package list I'm depending on and needs to make sure that it's installed | |
(setq my-package-list '(use-package | |
magit | |
org | |
cider | |
clj-refactor | |
parinfer | |
auto-complete | |
evil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a sample config for Kwm | |
The following statements can be used to set Kwms internal directory structure. | |
This is the root folder for Kwms files, the only thing this actually | |
specifies is the location of the 'init' script which Kwm runs upon startup. | |
Defaults to $HOME/.kwm | |
kwm_home /path/to/.kwm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cljify) | |
(require 'clojure.string) | |
(require 'clojure.walk) | |
(defn cljify1 [o] | |
(when (not (nil? o)) | |
(let [cname (.getName (class o)) | |
s (partial clojure.string/starts-with? cname)] | |
(cond |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Dashboard Looper</title> | |
<script type="text/javascript"> | |
var dashboards = [ | |
{ | |
"title": "Palesz.org", | |
"url": "http://palesz.org", | |
"delay": "5" | |
}, |
NewerOlder