Skip to content

Instantly share code, notes, and snippets.

View piersolenski's full-sized avatar
💤
Sleeping

Piers Olenski piersolenski

💤
Sleeping
View GitHub Profile
@piersolenski
piersolenski / iris_rev__4.json
Created March 24, 2022 18:35
Iris Keyboard Config
{
"name": "Iris Rev. 4",
"vendorProductId": 3406840406,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_MPLY",
"KC_1",
"KC_2",
"KC_3",
@piersolenski
piersolenski / user.css
Created October 30, 2021 01:41
Rose Pine Ferdi Telegram React Theme
html.night {
/* Rose Pine */
--base: #191724;
--surface: #1f1d2e;
--overlay: #26233a;
--inactive: #555169;
--subtle: #6e6a86;
--subtle-light: #817c9c;
--text: #e0def4;
--love: #eb6f92;
@piersolenski
piersolenski / cloundinaryAccountMigration.js
Created May 13, 2020 09:57
Cloudinary Account Migration
const request = require("request-promise");
const cloudinary = require("cloudinary");
const config = {
from: {
cloud_name: "",
api_key: "",
api_secret: "",
},
to: {
#!/bin/bash
# THIS SCRIPT UPDATES EMBY TO THE LATEST STABLE VERSION
# IF AN UPDATE IS AVAILABLE.
#
# Script must be run as root or with root priveleges
# (like using sudo)
#
# !!! USE AT YOUR OWN RISK !!!
#
@piersolenski
piersolenski / smoothScroll.js
Created January 29, 2020 10:20
Simple smooth scroll
function init(){
new SmoothScroll(document,120,12)
}
function SmoothScroll(target, speed, smooth) {
if (target === document)
target = (document.scrollingElement
|| document.documentElement
|| document.body.parentNode
|| document.body) // cross browser support for document scrolling
let starttime;
function moveit(timestamp, x, duration){
const runtime = timestamp - starttime;
let progress = Math.min((runtime / duration), 1);
console.log(x * progress);
if (runtime < duration) requestAnimationFrame(timestamp => moveit(timestamp, x, duration));
}
requestAnimationFrame(timestamp => {
@piersolenski
piersolenski / psh.zsh-theme
Created August 9, 2016 13:55
A ZSH theme
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[yellow]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
RPROMPT='%{$fg[blue]%}[%*]%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[red]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) %{$fg[green]%}✔%{$reset_color%}"
@piersolenski
piersolenski / udptroll.py
Created May 14, 2015 22:43
Make Ray's computer say funny shit via UDP
import socket
import argparse
import subprocess
if __name__ == "__main__":
p = argparse.ArgumentParser()
p.add_argument("port", type=int)
args = p.parse_args()
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)