Skip to content

Instantly share code, notes, and snippets.

@mygeekdaddy
mygeekdaddy / sidebar_example.html
Created Nov 6, 2014
Example of sidebar.html Pelican template with DDG search
View sidebar_example.html
<aside class="sidebar">
{% if SIDEBAR_IMAGE %}
<section>
<img src="{{ SITEURL }}/{{ SIDEBAR_IMAGE }}" alt="{{ SIDEBAR_IMAGE_ALT}}" width="{{SIDEBAR_IMAGE_WIDTH}}"/>
</section>
{% endif %}
<section>
<h1>Search</h1>
<form method="get" id="search" action="http://duckduckgo.com/">
@mygeekdaddy
mygeekdaddy / sitemap.html
Created Nov 6, 2014
Pelican sitemap.xml templat for Pelican
View sitemap.html
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for article in articles %}
<url>
<loc>{{ SITEURL }}/{{ article.url }}</loc>
<priority>0.8</priority>
</url>
{% for translation in article.translations %}
@mygeekdaddy
mygeekdaddy / universal_image_merge.py
Created Oct 14, 2014
Pythonista script to merge two images together
View universal_image_merge.py
# ** Universal iOS screenshot merge **
# Script will take two images of same orientation and merge them together.
#
# By: Jason Verly (@mygeekdaddy)
# Date: 2014-10-13
# Ver: 1.02
import clipboard
import Image
import console
@mygeekdaddy
mygeekdaddy / curipaddr.py
Created Aug 19, 2014
Python script to get current IP address
View curipaddr.py
#!/usr/bin/env python
import sys, socket
def main():
try:
# fqdn = socket.getfqdn()
ip_addr = socket.gethostbyname(socket.getfqdn())
print ip_addr
return 0
@mygeekdaddy
mygeekdaddy / curipaddr.py
Created Aug 11, 2014
Print current IP address of system
View curipaddr.py
#!/usr/bin/python
import socket
fqdn = socket.getfqdn()
ip_addr = socket.gethostbyname(fqdn)
print ip_addr
@mygeekdaddy
mygeekdaddy / index.coffee
Created Aug 11, 2014
Übersicht widget to display your current IP address
View index.coffee
command: "/Users/mygeekdaddy/Dropbox/bin/Python/curipaddr.py"
refreshFrequency: 6000000
style: """
bottom: 212px
left: 15px
color: #fff
font-family: Helvetica Neue
@mygeekdaddy
mygeekdaddy / index.coffee
Created Aug 10, 2014
Coffeescript widget for Übersicht to monitor available HD space
View index.coffee
command: "df -Hl | grep 'disk1' | awk '{print $4\" used/\"$2 \" free (\"$5\" used )\"}'"
refreshFrequency: 60000000
style: """
bottom: 350px
left: 15px
color: #fff
font-family: Helvetica Neue
@mygeekdaddy
mygeekdaddy / hdspace.js
Created Aug 10, 2014
Javascript widget for Übersicht to show available HD space
View hdspace.js
command: "df -Hl | grep 'disk1' | awk '{print $4\" used/\"$2 \" free (\"$5\" used )\"}'",
refreshFrequency: 60000000,
render: function (output) {
return "<div><h1>" + output + "</h1></div>";
},
style: " \n\
bottom: 300px \n\
@mygeekdaddy
mygeekdaddy / startTimer.py
Created Jul 26, 2014
startTimer.py script for WorkFlow process
View startTimer.py
# startTimer.py - writes epoch time to text file for work log
# by: Jason Verly
# rev date: 2014-07-25
import time
import console
import os
import os.path
import clipboard
import webbrowser
import urllib
@mygeekdaddy
mygeekdaddy / stopTimer.py
Created Jul 26, 2014
stopTimer.py script for WorkLog workflow
View stopTimer.py
# stopTimer.py - generates closure notes for Drafts action
# & removes the temporary 'timer.txt' file
# by: Jason Verly
# rev date: 2014-07-25
import time
import console
import os
import os.path
import webbrowser
import clipboard
You can’t perform that action at this time.