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 | |
use strict; | |
use warnings; | |
package ReceiveConnection; | |
use IO::Socket::INET; | |
sub TIEARRAY { |
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 | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use threads; | |
use threads::shared; | |
use Thread::Queue; |
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 sprintf() { | |
if (!arguments || arguments.length < 1 || !RegExp) { return; } | |
var str = arguments[0]; | |
var re = /([^%]*)%('.|0|\x20)?(-)?(\d+)?(\.\d+)?(%|b|c|d|u|f|o|s|x|X)(.*)/; | |
var b = [], numSubstitutions = 0, numMatches = 0; | |
while (1) { | |
var a = re.exec(str); | |
if (!a) { break; } | |
var leftpart = a[1], pPad = a[2], pJustify = a[3], pMinLength = a[4]; | |
var pPrecision = a[5], pType = a[6], rightPart = a[7]; |
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
diff -ur screen-4.0.3/display.c screen-4.0.3-swap-x/display.c | |
--- screen-4.0.3/display.c 2003-12-05 05:45:41.000000000 -0800 | |
+++ screen-4.0.3-swap-x/display.c 2010-08-09 23:59:07.465303854 -0700 | |
@@ -33,6 +33,8 @@ | |
#include "extern.h" | |
#include "braille.h" | |
+int swap_x = 1; | |
+ | |
static int CountChars __P((int)); |
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 | |
if [ "$TERM" != "screen" ]; then | |
# if the auth socket variable is empty, don't do anything | |
if [ ! -z "$SSH_AUTH_SOCK" ]; then | |
# include USER to protect against shared HOME directories (rare) | |
NEWSOCK=$HOME/.agent-sshscreen-$USER.sock | |
if [ "$SSH_AUTH_SOCK" != "$NEWSOCK" ]; then | |
# test if the auth sock we have is actually working | |
# don't link to a dead socket |
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
# install operating system onto new drive | |
# previous computer's drive is mounted in /mnt/oldinstall | |
# install all software my previous machine had installed | |
# - might want to trim off distribution and arch if going to a new release | |
# - or just skip this if going to a new release | |
yum install $( diff <( chroot /mnt/oldinstall rpm -qa | sort ) <( rpm -qa | sort) | grep \< | cut -c3- ) | |
# or apt-get if you have it | |
# copy home directories |
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
#node is an already known package. node.js have dot in name, so "nodejs" | |
#is a better name | |
#some ideas are taken from | |
#http://blog.fpmurphy.com/2010/12/node-js-and-npm-on-fedora-14.html | |
Name: nodejs | |
Version: 0.4.8 | |
Release: 0%{?dist} | |
Summary: JavaScript server-side network application development | |
Group: Development/Languages/Other | |
License: MIT |
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
#include <stdlib.h> | |
#include <time.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
void uxsleep(int time) | |
{ | |
sleep(time); | |
} |
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 | |
# print a ps listing that includes the used swap space | |
# inspired by Erik Ljungstrom 27/05/2011 | |
maxwidth=$( stty -a | tr ';' '\n' | grep columns | awk '{ print $2 }' ) | |
maxwidth=$(( maxwidth - 10 )) | |
pscols=vsz:10,rss:10,pid,user,pri,stime,time:12,cmd | |
paste <( echo SWAP ) <( ps -p $$ -o $pscols | head -1 ) | |
for procdir in /proc/[0-9]* ; do | |
PID=$( basename $procdir ) |
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
Name: rinse | |
Version: 1.9.1 | |
Release: 0%{?dist} | |
Summary: Carry out the installation of a new RPM-based distribution. | |
Group: Development/Tools | |
License: Artistic | |
URL: http://www.steve.org.uk/Software/rinse/ | |
Source: http://www.steve.org.uk/Software/rinse/rinse-%{version}.tar.gz | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | |
BuildRequires: make |