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
``` | |
. | |
├── curlTimerFormat.txt | |
├── env | |
│ ├── bin | |
│ │ ├── activate | |
│ │ ├── activate.csh | |
│ │ ├── activate.fish | |
│ │ ├── activate_this.py | |
│ │ ├── aws |
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
filePointer = open('catchme.py', 'r') | |
builtFunc = [] | |
for lines in filePointer: | |
if lines[:3] == 'def': | |
inFunc = True | |
if inFunc == True: | |
if lines[0] == lines.strip(): | |
inFunc = False | |
builtFunc.append(lines.strip()) | |
filePointer.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
export PS1='\[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 "(%s)") \[\033[01;34m\]$\[\033[00m\] ' |
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
server { | |
listen 80; | |
server_name example.org; | |
access_log /var/log/nginx/example.log; | |
location / { | |
proxy_pass http://127.0.0.1:8000; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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 cherrypy | |
import os.path | |
current_dir = os.path.dirname(os.path.abspath(__file__)) | |
class RootPage: | |
def index(self): | |
raise cherrypy.HTTPRedirect("/static/index.html") |
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
--- | |
--- | |
{% for posts in site.posts %} | |
#{{ post.id }} { | |
overflow:hidden; | |
width:100%; | |
height:auto; | |
background-image:url("{{ "assets/img/" | append post.img }}") | |
} |
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
# Requires jpegoptim, pngquant, optipng, gifsicle as well as scour and python. | |
# The scour.py file should be located at ~/scour/scour.py | |
# IMPORTANT: This script OVERWRITES existing image files. | |
# Licensed under the MIT License | |
# The MIT License (MIT) |
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
<script type="text/javascript"> | |
<!-- | |
/** | |
* Converts an xs:date or xs:dateTime formatted string into the local timezone | |
* and outputs a human-readable form of this date or date/time. | |
* | |
* @param {string} gCalTime is the xs:date or xs:dateTime formatted string | |
* @return {string} is the human-readable date or date/time string | |
*/ | |
function formatGCalTime(gCalTime) { |
NewerOlder