Skip to content

Instantly share code, notes, and snippets.

View MrMino's full-sized avatar
🚀
LTE → 🌘

Blazej Michalik MrMino

🚀
LTE → 🌘
View GitHub Profile
@junzis
junzis / python_time.py
Last active February 11, 2024 14:44
Time conversions in python
from datetime import datetime
import time
#-------------------------------------------------
# conversions to strings
#-------------------------------------------------
# datetime object to string
dt_obj = datetime(2008, 11, 10, 17, 53, 59)
date_str = dt_obj.strftime("%Y-%m-%d %H:%M:%S")
print date_str
## Bash Prog Intro Notes
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://tldp.org/LDP/abs/html/
http://mywiki.wooledge.org/BashPitfalls
## Intro:
I feel like writing bash is like building something with hot glue.
When try it for the first time, you'll probably make a big mess and burn yourself.
As you get a little more experienced, you can slap things together really quickly but the end result won't be very sturdy or pretty.
@dannvix
dannvix / www-proxy.c
Created January 30, 2013 06:47
very simple HTTP proxy server written by Steve Shipway
/* www-proxy.c Copyright Imperial Business Systems 1995
Proxy http server.
Written by Steve Shipway (steve@cheshire.demon.co.uk,steve@imperial.co.uk)
in the space of 2 hours. It took a further 1 hour to remove the last
bug. And 2 hours to persuade myself to stop playing with Netscape after it
was working.
Command line args:
-d : debug mode. Use port 8000 instead, dont background, status msgs
-l logfile : logfile to use
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: