Skip to content

Instantly share code, notes, and snippets.

View w33tmaricich's full-sized avatar

Alexander Maricich w33tmaricich

  • LightFeather.io
  • Bowie, MD
View GitHub Profile
@w33tmaricich
w33tmaricich / keyboard_shortcuts.txt
Last active February 6, 2020 12:46
ref: emacs keyboard shortcuts
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
@w33tmaricich
w33tmaricich / sql_firelizzard.php
Last active March 21, 2016 14:12
php: ethan's sql library
<?php
class SQLConnection {
private $link, $host, $user, $pass, $dbname, $new, $flags;
function __construct($host,
$user,
$pass,
$dbname = "",
$new = false,
$flags = 0,
@w33tmaricich
w33tmaricich / download.py
Last active March 21, 2016 14:12
py: download from url
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()
@w33tmaricich
w33tmaricich / files.py
Last active March 21, 2016 14:12
py: number of files in directory
import os
number = len([name for name in listdir('.') if isfile(name)])