This file contains hidden or 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
ifconfig eth0 up | |
iwconfig eth0 essid any | |
ifup eth0 |
This file contains hidden or 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
Error for wireless request "Set <option name>" (<related option code>) : | |
SET failed on device <wireless device> ; Operation not permitted. |
This file contains hidden or 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
class BaseSevenNumber: | |
def __init__(self): | |
self.digits = [1] | |
def Double(self): | |
for i in range(0, len(self.digits)): | |
self.digits[i] = self.digits[i] * 2 | |
for i in range(len(self.digits) - 1, -1, -1): | |
if self.digits[i] > 6: |
This file contains hidden or 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
def BaseSeven(num): | |
powersOfSeven = 1; | |
res = 0; | |
while num / powersOfSeven > 6: powersOfSeven = powersOfSeven * 7 | |
while powersOfSeven != 1: | |
res = res * 10 + int(num / powersOfSeven) | |
num = num - int(num / powersOfSeven) * powersOfSeven | |
powersOfSeven = powersOfSeven / 7 | |
res = res * 10 + num | |
return res |
This file contains hidden or 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
$ mv greetings_essare_and_avare.m4a greetings_essare_and_avare.m4b |
This file contains hidden or 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
$ ffmpeg -i greeting_essare_and_avere.mp3 -acodec aac greetings_essare_and_avare.m4a |
This file contains hidden or 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
$ video2ipod Chemical_Brothers_-_Believe.wmv Chemical_Brothers_-_Believe.mp4 |
This file contains hidden or 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
$ chmod +x video2ipod |
This file contains hidden or 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
<?php | |
// Our Database Class | |
include("lib/database.php"); | |
$db = new Database(); // Instantiate our Database Class | |
$resArr = $db->query("SELECT * FROM users WHERE userid != 1"); // Query! | |
// $resArr is now an associative array containing the entire result set | |
// of the SQL query. We can now use and abuse this data as necessay. | |
// In this hypothetical situation, I am returing all of the users in |
This file contains hidden or 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 query($qry) | |
{ | |
if(!isset($this->database_link)) $this->connect(); | |
$result = mysql_query($qry, $this->database_link) or die("Error: ". mysql_error()); | |
$returnArray = array(); | |
$i=0; | |
while ($row = mysql_fetch_array($result, MYSQL_BOTH)) | |
if ($row) | |
$returnArray[$i++]=$row; | |
mysql_free_result($result); |