Skip to content

Instantly share code, notes, and snippets.

@arc-strix
arc-strix / multiReplace.lua
Created November 20, 2017 20:43 — forked from touilleMan/multiReplace.lua
Aegisub script to do multiple replacements a once on the sub
--[[
multiReplace is (c) 2015 by Emmanuel Leblond <[email protected]>.
It is licensed to you under the terms of the WTFPLv2 (see below).
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <[email protected]>
#!/bin/bash
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me
PID=$(pgrep -u USER gnome-session-b)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH'
/usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected] set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(69,90,100)'
@arc-strix
arc-strix / TipCalc.py
Created March 23, 2017 23:50
Tip Calc
meal = 44.50
tax = 0.0675
tip = 0.15
meal = meal + meal * tax
total = meal + (meal*tip)
print("%.2f" % total)
@arc-strix
arc-strix / PygLatin.py
Last active April 3, 2017 18:52
PygLatin in Python
#!python3
pyg = 'ay'
#get user input
original = input('Enter a word:')
#do a check to make sure that the input is all alpha chars
if len(original) > 0 and original.isalpha():
#convert input to lower case for ease of use
word = original.lower()