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 | |
echo "chrooting to Arch Linux" | |
sudo cp /etc/resolv.conf /usr/local/arch/etc/resolv.conf | |
sudo mount -o bind /dev /usr/local/arch/dev | |
sudo mount -t devpts -o rw,nosuid,noexec,relatime,mode=620,gid=5 none /usr/local/arch/dev/pts | |
sudo mount -t proc proc /usr/local/arch/proc | |
sudo mount -t sysfs sys /usr/local/arch/sys | |
sudo chroot /usr/local/arch /bin/su - <your username here> | |
echo "leaving Arch Linux chroot" |
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> | |
<script type="text/javascript"> | |
var NONE = 0; | |
var PLUS = 1; | |
var MINUS = -1; | |
function calculateWeightedProduct(digit, weight, sign) { | |
var value = digit * weight; |
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
import pygame, random, sys, time | |
def main(): | |
width = 640 | |
height = 480 | |
x = width / 2 | |
y = height / 2 | |
shade = 0 |
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 | |
# Script to rip a CD in FLAC format using Morituri | |
# Offset is for Optiarc AD-7710H | |
rip cd rip --offset 48 --track-template="%A/%d/%t %a - %n" --disc-template="%A/%d/%A - %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
#!/bin/sh | |
# Script to convert all FLAC files in the current | |
# folder to 320k MP3 files | |
parallel ffmpeg -i "{}" -ab 320k "{.}.mp3" ::: *.flac |
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 | |
# Quick script to scan FLAC files and convert those to MP3 that don't exist | |
queuefile="/tmp/flac2mp3queue.txt" | |
echo "****************************************************************" | |
echo "Begin process at `date`" | |
if [ -f "$queuefile" ] | |
then |
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
import pygame | |
def main(): | |
arc = 0.25 | |
base_angle = 0.0 | |
circle_width = 20 | |
circle_height = 20 | |
fps = 60 | |
speed = 0.1 | |
window_width = 800 |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace ml | |
{ | |
public class Citizen | |
{ | |
private static int _nextId = 0; |
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 python | |
import gobject | |
import dbus | |
import dbus.service | |
import dbus.mainloop.glib | |
def on_properties_changed(interface, props, invalidated_props): | |
if "Metadata" in props: | |
metadata = props.get("Metadata") |
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 | |
# Delete the existing entries | |
#sudo efibootmgr --unicode -B -b 0001 | |
sudo efibootmgr --unicode -B -b 0000 | |
# Create the new entries | |
sudo efibootmgr -c \ | |
--label "Arch Linux" \ | |
--loader /vmlinuz-linux \ |