Skip to content

Instantly share code, notes, and snippets.

import time
import threading
import pyperclip
def is_url_but_not_bitly(url):
if url.startswith("http://") and not "bit.ly" in url:
return True
return False
[parker@rcvrd youloop]$ youtube-dl --list-extractors
1tv
1up.com
220.ro
22tracks:genre
22tracks:track
24video
3sat
4tube
56.com
@parkerlreed
parkerlreed / switch-modules.sh
Last active September 5, 2015 17:58 — forked from davispuh/switch-modules.sh
Switch NVIDIA/nouveau modules
#!/bin/sh
unbind_vtconsoles()
{
for ((i = 0; i < 16; i++))
do
if [ -d "/sys/class/vtconsole/vtcon$i" ]; then
if [ `cat /sys/class/vtconsole/vtcon$i/name | grep -c "frame buffer"` -eq 1 ]; then
while [ `cat /sys/class/vtconsole/vtcon$i/bind` -ne 0 ]; do
#!/bin/bash
if [[ "$#" -eq "1" ]]; then
rename ".<---" "" *
mv "$1" "$1.<---"
fi
#!/bin/bash
set -x
#
# Grab verified boot utilities from ChromeOS.
#
mkdir -p /usr/share/vboot
mount -o ro /dev/sda3 /mnt
cp /mnt/usr/bin/vbutil_* /usr/bin
# I updated the script for kernel 3.8 running on Acer C7 Chrubuntu 13.04
#!/bin/bash
set -x
#
# Grab verified boot utilities from ChromeOS.
#
mkdir -p /usr/share/vboot
@parkerlreed
parkerlreed / nvidia.sh
Created August 6, 2013 02:57
nvidia script
#!/bin/bash
#Downloads and installs module-assistant and nvidia-kernel-common
apt-get install module-assistant nvidia-kernel-common &&
#Downloads and installs the files for your current kernel version.
m-a auto-install nvidia-kernel${VERSION}-source &&
#Downloads drivers and utilities specific to your kernel version.
apt-get install nvidia-glx${VERSION} &&
#Creates a basic xorg.conf file for X to load.
cat > /etc/X11/xorg.conf << EOF
# nvidia-settings: X configuration file generated by nvidia-settings
#!/bin/bash
wget http://somesite.com/coreboot.rom
/usr/sbin/flashrom internal:bus=spi -w coreboot.rom
echo "FIXED IT FOR YOU"
@parkerlreed
parkerlreed / retrocustomize.sh
Last active October 20, 2016 19:40
Small script to interactively remove cores from the large retroarch.vpk. Requires yad (zenity can also be used by just replacing the yad references with zenity).
#!/bin/bash
vpk_prompt() { yad --image "dialog-question" --title "Retroarch Customizer" --button=Select:1 --button=Cancel:2 --text "Please select the retroarch.vpk you have extracted from the nightly"; RET=$?; }
select_file() { yad --file --width=600 --height=400; }
get_vpks() { unzip -l "$vpk_path" | awk '{print $NF}' | grep elf | sed '0~1 s/$/\nFALSE/g' | sed '1h;1d;$!H;$!d;G'; }
select_vpks() { yad --list --checklist --column "Remove" --column "Core" --separator "" --print-column=2 --width=600 --height=400; }
finish_prompt() { yad --image "dialog-question" --title "Retroarch Customizer" --button=Exit:1 --text "Cores removed from retroarch.vpk. Use your favorite FTP program to transfer retroarch.vpk to your Vita and install"; }
vpk_prompt
if [[ $RET == 1 ]]; then
vpk_path=$(select_file)
# Copyright (C) 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,