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
#!/bin/bash | |
email_domain=example.com | |
export email_domain | |
# so nothing in the environment comes through | |
unset GIT_AUTHOR_EMAIL | |
unset GIT_AUTHOR_DATE | |
unset GIT_AUTHOR_NAME | |
unset GIT_COMMITTER_NAME |
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
#!/usr/bin/env python | |
# with help and inspiration from | |
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure) | |
# * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL | |
# * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html | |
import sys | |
import base64 | |
import struct |
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); | |
} |
OlderNewer