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
function settitle() { | |
local USAGE | |
USAGE="usage: settitle WINDOW_TITLE" | |
if [ -z "$1" ]; then | |
echo -e "$USAGE"; return 1 | |
fi | |
echo -ne "\033]0;$1\007" | |
} |
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 | |
# http://neondust.tumblr.com/post/97723922505/simple-tumblr-backup-script-for-mac-os-x-and-linux | |
# https://gist.github.com/doersino/7e3e5db591e42bf543e1 | |
# BLOGS is a space-separated list of the blogs you want to backup. You can omit | |
# the ".tumblr.com" part if you want. | |
BLOGS="neondust.tumblr.com aufgeloest.tumblr.com hejlisten.tumblr.com" | |
# OUT is the directory where the backups will be stored. For each blog, a date- | |
# prefixed subdirectory will be created here. |
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
<!-- gets source of your previously ReAD articles | |
before executing this file, update your database according to the | |
import.sql file (i.e. add a column "source" of type MEDIUMTEXT to the | |
"read" table) --> | |
<meta charset="UTF-8"><body style="overflow-x: scroll;"><pre><?php | |
error_reporting(E_ALL); | |
ini_set('max_execution_time', 30); |
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 | |
# http://www.reddit.com/r/spacex/comments/2pwjni/live_video_of_asds_in_port/cn19n2i?context=7 | |
# https://gist.github.com/doersino/ade1edd8fe154ea30ba4 | |
# | |
# This script downloads a webcam image to a date/hour-labeled directory, | |
# creating intermediate directories as required, making sure that the image is | |
# not corrupt, and optionally overlaying the current date and time on the image | |
# and maintaining a mirror of the webcam. Any images from the previous day will | |
# optionally be ZIP-compressed and compiled into a MP4 video after the first |
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 | |
# Clone or update a user's public gists. | |
# Usage: backup_gists.py USERNAME [DIR] | |
import json | |
from subprocess import call | |
from urllib import urlopen | |
import os | |
import sys |
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 | |
# Performs an rsync with predefined flags, configurable default arguments, only | |
# the most important options (dry-run and excludes), and sanity checking. | |
# | |
# Usage: | |
# ./backup_sync.sh [-n] [-e EXCLUDE] [-f FLAGS] [-d] [SRC] [DEST] | |
# | |
# (If SRC or DEST are not given, the defaults will be used.) | |
# |
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
function setvolume() { | |
local USAGE | |
USAGE="usage: setvolume NUMBER_FROM_0_AND_7" | |
if [ -z "$1" ]; then | |
echo -e "$USAGE"; return 1 | |
fi | |
osascript -e "set volume $1" | |
} |
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 | |
# Avoids the memory leak occuring when capturing many webcam pictures using | |
# imagesnap version 0.2.5 by regularly restarting the command. | |
# | |
# As a result, the interval between successive pictures is not always exactly as | |
# specified in $IMAGESNAP_CONFIG. To get as close to it as possible, set | |
# $RESTART_INTERVAL to some multiple of the -t interval. | |
# By default, imagesnap is configured to wait 1s before taking the first | |
# picture: without this delay, the first picture tends to be underexposed. |
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 | |
# This script creates a backup of your Uberspace home folder, as well as your | |
# websites and MySQL databases. Configure username and server before running. | |
# | |
# TODO ^C should quit this entire script and clean up first (remove db backup) | |
# TODO some error handling and exit codes | |
# TODO set username and server via flags | |
# TODO sanity checking before backup: "these server contents get copied to this local folder" |
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
; ModuleID = 'dotp.c' | |
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
; Function Attrs: nounwind readonly uwtable | |
define float @dotp(float* nocapture %a, float* nocapture %b, i32 %count) #0 { | |
%1 = icmp sgt i32 %count, 0 | |
br i1 %1, label %.lr.ph, label %._crit_edge | |
.lr.ph: ; preds = %0, %.lr.ph |
OlderNewer