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/sh | |
# | |
# Runs a command multiple times in new terminals with different arguments | |
# | |
# Authors: | |
# Yousef Amar <yousef@amar.io> | |
# | |
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.*; | |
import java.net.*; | |
public class WebLogin { | |
public static String login(String username, String password) { | |
//TODO: Add version parameter. | |
String parameters = "username="+username+"&password="+password; | |
HttpURLConnection connection = null; | |
try { |
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 <iostream> | |
using namespace std; | |
bool bitTest(unsigned int num, int bit) { | |
return ((1<<bit)&num)>0; | |
} | |
void printBin(unsigned int num) { | |
int i; | |
cout << num <<" in binary is: "; |
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
# So I finally try messing with Python and what better way to try for-loops that with turtle gfx. | |
from turtle import * | |
import time | |
color("blue") | |
up() | |
goto(0,100) | |
down() | |
circle(50) |
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 os | |
import sys | |
words = [] | |
answers = ['']*10 | |
print "Enter 10 scrambled terms." | |
for i in range(10): | |
words.append(raw_input().strip()) |
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 os | |
sTerm = raw_input("Search term: ") | |
for root, dirs, files in os.walk("."): | |
print root | |
for fname in files: | |
print " "+fname | |
with open(root+os.sep+fname) as f: | |
flines = f.readlines() |
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.net.*; | |
import java.lang.*; | |
import java.util.*; | |
public class IPScanner implements Runnable { | |
// Create a list in which to store live host IP addresses | |
static List<String> ips = Collections.synchronizedList(new ArrayList<String>()); | |
private String ip; |
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 urllib | |
import time | |
import os | |
if not os.path.exists("imgs"): | |
os.makedirs("imgs") | |
for i in xrange(1,260): | |
urllib.urlretrieve("http://s.4cdn.org/image/title/"+str(i)+".png", "imgs/"+str(i)+".png") | |
time.sleep(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
#!/usr/bin/env lsc | |
w = 0.5 | |
_w = 1 - w | |
n1 = 50 | |
n2 = 100 | |
mem = 0 | |
i = 0 | |
do |
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 lsc | |
w = 0.5 | |
_w = 1 - w | |
n1 = 50 | |
n2 = 100 | |
mem = 0 | |
i = 0 | |
do |
OlderNewer