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
@echo off | |
set GUEST="Ubuntu 10.10 Server x86" | |
set MANAGE="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" | |
%MANAGE% setextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" | |
%MANAGE% setextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" | |
%MANAGE% setextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" |
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
:(){:|:;};: |
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
# -*- coding: utf-8 -*- | |
import urllib, sgmllib | |
import re | |
import os, shutil | |
class IDParser(sgmllib.SGMLParser): | |
'''Returns list of contestant IDs from main page''' | |
def __init__(self): |
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 | |
_run() { | |
wd=$PWD | |
bash -cli "$*" | |
result=$? | |
[ $result == 0 ] && description="Successfully executed" || description="Failed with code $result" | |
cmd=${*:-"Nothing"} | |
file=`mktemp` | |
trap "rm $file" EXIT ERR TERM KILL |
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 | |
# | |
# Finds users with huge home dirs, and appends info to motd | |
# | |
############################################################# | |
LIMIT=5 | |
FREE_LIMIT= |
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 | |
mnt_dir="/mnt" | |
server=$1 | |
temp="/tmp/mnts_$$" | |
die() { | |
echo "Some error occured" | |
exit 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 | |
for i in *; do | |
if [ "${i##*.}" == "mp3" ]; then | |
mp3unicode -s cp1251 --id3v1-encoding unicode --id3v2-encoding unicode $i | |
fi | |
done |
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 <stdio.h> | |
void swap(int *, int *); | |
void swap_xor(int *, int *); | |
int main() { | |
int a = 1, b = 2; | |
printf("a = %i, b = %i\n", a, b); |
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 java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.io.PrintWriter; | |
import java.util.Scanner; | |
public class MatrixRotator { | |
public static void main(String[] args) throws IOException { |
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
/** | |
* New user registration. | |
*/ | |
public class RegistrationFormActivity extends Activity { | |
// for file uploading | |
private final static int FILE_CHOOSER_RESULT_CODE = 1; | |
private ValueCallback<Uri> uploadFile; | |
// ... |
OlderNewer