Skip to content

Instantly share code, notes, and snippets.

View HondoOhnaka's full-sized avatar

Hondo HondoOhnaka

  • Ohnaka Transport Solutions
  • Black Spire Outpost, Batuu
View GitHub Profile
@roadsideseb
roadsideseb / python_job_sites.md
Last active April 4, 2018 10:44
Job sites for Django and Python developers
import base64
import hashlib
import hmac
from urllib import urlencode
HOSTNAME = 'http://publishing-api.singleplatform.com'
SIGNING_KEY='YOUR_SIGNING_KEY'
CLIENT_ID='YOUR_CLIENT_ID'
@scottmagdalein
scottmagdalein / clickable-element.html
Last active March 15, 2023 18:01
Make the Mailchimp Subscriber popup appear on click
<!-- This is the HTML element that, when clicked, will cause the popup to appear. -->
<button id="open-popup">Subscribe to our mailing list</button>
@obfusk
obfusk / break.py
Last active November 10, 2025 05:32
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use https://docs.python.org/3/library/pdb.html
import code; code.interact(local=dict(globals(), **locals()))
function sendmail() {
subject=$1
message=$2
/usr/bin/curl -XPOST
--data-urlencode "api_user=$API_USER" \
--data-urlencode "api_key=$API_KEY"\
--data-urlencode "to=$EMAIL" \
--data-urlencode "subject=$subject" \
--data-urlencode "text=$message" \
@mauryaratan
mauryaratan / stagtools.txt
Last active August 14, 2017 07:51
StagTools WordPress Plugin's list of all available shortcodes, just in case you want to use theme manually instead of shortcode builder.
Alerts
======
[stag_alert style="white"]Your Alert![/stag_alert]
Styles: white, grey, red, yellow, green, blue
Buttons
=======
@paulund
paulund / add-option-to-dropdown.js
Created June 25, 2013 18:50
Add and Remove Options in Select using jQuery
$("#selectBox").append('<option value="option6">option6</option>');
@brandonpittman
brandonpittman / CD2DIR.applescript
Last active July 6, 2019 09:25
AppleScript to switch to the current Finder directory while navigating the command line. Run as a TextExpander snippet (set to "AppleScript") for maximum utility.
tell application "System Events"
tell process "Finder"
if window 1 exists then
tell application "Finder"
set thePath to get quoted form of POSIX path of (target of front Finder window as text)
return "cd " & thePath & return
end tell
else
display alert "Finder doesn't have a window open." as warning giving up after 2
end if
@yarysh
yarysh / JSONResponseMixin.py
Created May 7, 2013 10:00
JSON response mixin for Django CBV.
#!/usr/bin/python
# coding: utf-8
import json
class JSONResponseMixin(object):
"""
A mixin that can be used to render a JSON response.
"""
@omz
omz / dropboxlogin.py
Created November 7, 2012 21:16
dropboxlogin
# YOU NEED TO INSERT YOUR APP KEY AND SECRET BELOW!
# Go to dropbox.com/developers/apps to create an app.
app_key = 'YOUR_APP_KEY'
app_secret = 'YOUR_APP_SECRET'
# access_type can be 'app_folder' or 'dropbox', depending on
# how you registered your app.
access_type = 'app_folder'