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
Emacs Commands List | |
C = Control | |
M = Meta = Alt|Esc | |
Basics | |
C-x C-f "find" file i.e. open/create a file in buffer | |
C-x C-s save the file | |
C-x C-w write the text to an alternate name | |
C-x C-v find alternate file |
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 | |
class SQLConnection { | |
private $link, $host, $user, $pass, $dbname, $new, $flags; | |
function __construct($host, | |
$user, | |
$pass, | |
$dbname = "", | |
$new = false, | |
$flags = 0, |
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 download(url): | |
""" | |
Copy a file from a given url to a local file | |
""" | |
import urllib | |
webfile = urllib.urlopen(url) | |
localfile = open(url.split('/')[-1], 'w') | |
localfile.write(webfile.read()) | |
webfile.close() | |
localfile.close() |
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
import os | |
number = len([name for name in listdir('.') if isfile(name)]) |
NewerOlder