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
#!/usr/bin/env python3 | |
""" | |
compare_commits.py | |
This script compares two Git commits (old and new) in the current repository, | |
taking into account renames. It does the following: | |
- Lists all Python and C++ files in each commit. | |
- Uses Git’s rename detection to map files that have been renamed. | |
- Reads the content of each file from the two commits. | |
- Uses difflib to count the number of unchanged lines between each paired file. |
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/bash -e | |
# user editable | |
local_dest=VenturePlan | |
wow="/mnt/c/Program Files (x86)/World of Warcraft/_retail_/Interface/AddOns" | |
# program editable | |
addon_whitelist=Addon | |
source=https://github.com/Gaboros/VenturePlan.git | |
addon_name=VenturePlan |
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
var TP_Nightstand_Off_Timer = null | |
val TP_LOWER = 6.5 | |
val FILENAME = "power.rules" | |
rule "scene - turn off nightstand when unused" | |
when | |
Item TP_Nightstand_Power received update | |
then | |
if (TP_Nightstand_Switch.state == OFF) { | |
logInfo(FILENAME, "nightstand already off") |
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
val Number tempShower = 23.0 | |
val Number tempComfortBath = 22.0 | |
val Number tempComfort = 21.5 | |
val Number tempMid = 19.0 | |
val Number tempSleep = 18.5 | |
val Number tempLower = 17.0 | |
val Number tempChill = 15.0 | |
val Number tempAway = 15.0 | |
val Number tempAwayLonger = 13.0 | |
val Number tempOff = 10 |
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
curl https://stackexchange.com/sites?view=list|awk '/lv-item/{getline; print}'|cut -d '"' -f2|grep -o '[^.]*\.[^.]*$'|sed 's/https:\/\///g'|sort|uniq|tr '\n' ',' | |
# output 10/28/2018: askubuntu.com,mathoverflow.net,serverfault.com,stackapps.com,stackexchange.com,stackoverflow.com,superuser.com |
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/bash | |
FOLDERS=( "" .Archive .Drafts .Flagged .Junk .Sent ) | |
LOGIN=$1 | |
BOSS=$2 | |
CEO= | |
ACL_CYRUS=lrswipcda | |
ACL_SELF=lrswipkxtecd | |
ACL_BOSS=lrswipkxtecd |
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
<?php | |
$machine = 'mycomputername'; | |
$max_cmd_len = intval(shell_exec('getconf ARG_MAX')); | |
$commands = array(); | |
$commands_del = array(); | |
$cur_command = ''; | |
$cur_command_del = ' -d '; |
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
<?php | |
$json = file_get_contents('http://listen.di.fm/public3'); | |
$j = json_decode($json, true); | |
$l = array(); | |
foreach ($j as $item) { | |
$l []= $item['key']; | |
} | |
sort($l); | |
echo join(' ', $l); |
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
play () { [[ -z $1 ]] && echo 00sclubhits ambient atmosphericbreaks bassline bassnjackinhouse bigbeat bigroomhouse breaks chillhop chillntropicalhouse chillout chilloutdreams chillstep classiceurodance classiceurodisco classictechno classictrance classicvocaltrance club clubdubstep darkdnb darkpsytrance deephouse deepnudisco deeptech detroithousentechno discohouse djmixes downtempolounge drumandbass drumstep dub dubstep dubtechno ebm eclectronica electro electronicpioneers electronics electropop electroswing epictrance eurodance funkyhouse futurebeats futuregarage futuresynthpop gabber glitchhop goapsy handsup hardcore harddance hardstyle hardtechno house idm indiebeats indiedance jazzhouse jungle latinhouse liquiddnb liquiddubstep liquidtrap lounge mainstage melodicprogressive minimal nightcore nudisco oldschoolacid oldschoolhouse oldschoolrave progressive progressivepsy psybient psychill russianclubhits soulfulhouse spacemusic techhouse techno trance trap tribalhouse umfradio undergroundtechno vocalchillout |
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
#!/usr/bin/python | |
# setup: pip install requests beautifulsoup4 | |
from decimal import Decimal | |
import requests | |
from bs4 import BeautifulSoup | |
import sys | |
import getpass |