Skip to content

Instantly share code, notes, and snippets.

View rilwansmith's full-sized avatar

Rilwan Smith rilwansmith

View GitHub Profile
@rilwansmith
rilwansmith / web-servers.md
Created January 14, 2022 02:31 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@rilwansmith
rilwansmith / PDO_Cheatsheet.php
Created February 26, 2021 13:05 — forked from hanvari/PDO_Cheatsheet.php
PHP PDO Cheatsheet
<?php
/*
Reference:
http://code.tutsplus.com/tutorials/why-you-should-be-using-phps-pdo-for-database-access--net-12059
*/
function connect(){
/*