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/perl -w | |
use strict; | |
use feature ':5.10'; | |
use Audio::MPD; | |
my $mpd = Audio::MPD->new; | |
my $command = shift; | |
given ($command) { | |
when ('add') { |
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
// WE LIKES THE PRECIOUS LAYOUTSES | |
partial alphanumeric_keys | |
xkb_symbols "intl" { | |
name[Group1]= "USA - International (with dead keys)"; | |
include "us(basic)" | |
// Alphanumeric section | |
key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] }; |
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
# cd to the top level of the current repo | |
alias cdg='cd $(git rev-parse --git-dir)/..' |
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
:: Written by Daenyth | |
:: Moves a given pdf file from Y:\ to the appropriate place in H:\ | |
:: Lines starting with :: are comments. | |
:: Lines starting with : are labels. | |
@echo off | |
:: Allows the use of !name! notation for variables | |
SETLOCAL EnableDelayedExpansion EnableExtensions | |
:: filename=first parameter passed to the script |
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 | |
rtorrent_watch_dir=~/torrent | |
torrent_holding_pen=~/torrent/pending | |
buffer=$((600 * 1024)) # Size in KB to keep unused (600MB) | |
space_left=$(($(df $rtorrent_watch_dir | awk '/dev/ {print $4}') - $buffer)) | |
tmpdir=$(mktemp -d /tmp/torrpen.XXXX) | |
get_torrent_size () { |
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 | |
# -*- coding: utf-8 -*- | |
# | |
# Network configuration tool for NetworkManager | |
# Copyright (C) 2010 TUBITAK/UEKAE | |
# | |
# This program is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU General Public License as published by the | |
# Free Software Foundation; either version 2 of the License, or (at your | |
# option) any later version. Please read the COPYING 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
Jul 1 14:59:28 player modem-manager: (ttyUSB0) closing serial device... | |
Jul 1 14:59:28 player modem-manager: (ttyUSB0) closing serial device... | |
Jul 1 14:59:28 player modem-manager: Removed modem /sys/devices/pci0000:00/0000:00:04.0/usb3/3-1 | |
Jul 1 14:59:28 player modem-manager: Removed modem /sys/devices/pci0000:00/0000:00:04.0/usb3/3-1 | |
Jul 1 14:59:28 player NetworkManager: <info> (ttyUSB0): now unmanaged | |
Jul 1 14:59:28 player NetworkManager: <info> (ttyUSB0): device state change: 8 -> 1 (reason 36) | |
Jul 1 14:59:28 player NetworkManager: <info> (ttyUSB0): deactivating device (reason: 36). | |
Jul 1 14:59:28 player NetworkManager: <info> (ppp0): removing resolv.conf from /sbin/resolvconf | |
Jul 1 14:59:28 player NetworkManager: <info> (ttyUSB0): cleaning up... | |
Jul 1 14:59:28 player NetworkManager: <info> (ttyUSB0): taking down device. |
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
Jul 2 04:00:25 player NetworkManager: <info> starting... | |
Jul 2 04:00:25 player NetworkManager: <info> Trying to start the modem-manager... | |
Jul 2 04:00:25 player NetworkManager: SCPlugin-Ifupdown: init! | |
Jul 2 04:00:25 player NetworkManager: SCPlugin-Ifupdown: update_system_hostname | |
Jul 2 04:00:25 player NetworkManager: SCPluginIfupdown: management mode: unmanaged | |
Jul 2 04:00:25 player NetworkManager: SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:18.0/0000:0b:00.0/net/eth0, iface: eth0) | |
Jul 2 04:00:25 player NetworkManager: SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:18.0/0000:0b:00.0/net/eth0, iface: eth0): no ifupdown configuration found. | |
Jul 2 04:00:25 player NetworkManager: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/lo, iface: lo) | |
Jul 2 04:00:25 player NetworkManager: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/lo, iface: lo): no ifupdown configuration found. | |
Jul 2 04:00:25 player |
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 IO | |
wanted :: (Integral a) => a -> Bool | |
wanted x | |
| mod 3 x == 0 = True | |
| mod 5 x == 0 = True | |
| otherwise = False | |
problem1 :: (Integral a) => a -> a | |
problem1 x = sum $ filter wanted [1 .. x] |
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
isPalindrome :: (Show a) => a -> Bool | |
isPalindrome a = show a == reverse $ show a |
OlderNewer