Skip to content

Instantly share code, notes, and snippets.

View skyl's full-sized avatar

Skylar Saveland skyl

View GitHub Profile

You can find the complete source of this zPage here


Special Free2z Syntax Extensions: Now Extra Peppy! 🎉

Embeds

You can embed a plethora of exciting content with the ::embed[URL] directive.

@skyl
skyl / django_hasher.py
Last active February 25, 2022 06:01 — forked from steve-chavez/django_hasher.py
Use django hasher to make password
# you have to have a django project to do it this way
# You can run this in a `./manage.py shell`
from django.contrib.auth.hashers import make_password
make_password("youreverysecuresuperpass")
# this will output something that looks like this:
# 'pbkdf2_sha256$260000$rgjSFB3xwsxkfcL1iE8wq6$bDtiRY0+gtE4ahFdfDeHwy0tzLb8McDRnppS8kD8QJs='
# by default in Django 4.0
@skyl
skyl / install.rb
Last active March 21, 2024 17:58
Homebrew without sudo
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY
# chmod +x install.rb
# ./install.rb
YOUR_HOME = ''
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local"
HOMEBREW_CACHE = '/Library/Caches/Homebrew'
HOMEBREW_REPO = 'https://github.com/Homebrew/homebrew'
@skyl
skyl / unfollow.py
Created October 3, 2014 18:30
Selectively unfollow people who don't follow you on twitter with gruesome and gory confirmation
import time
import sys
import tweepy
consumer_key = ""
consumer_secret = ""
key = ""
secret = ""
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
@skyl
skyl / gist:ea2ab1c62a547e381411
Created May 16, 2014 05:15
Virtualenv/pip on Jython2.7b2
OSX - 10.8.5
❯ virtualenv-2.7 --version
1.11.5
❯ ./jython/dist/bin/jython
Jython 2.7b2+ (default:f6f7196d27a5, May 15 2014, 20:10:22)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_55
Type "help", "copyright", "credits" or "license" for more information.
>>>
"""
https://brilliant.org/community-problem/loser-keeps-bieber-we-stood-no-chance/
?group=4cgSapeNTVXO&ref_id=115277
"""
import random
def play_defensive(them):
if random.random() <= 0.04:
@skyl
skyl / gist:7922856
Created December 12, 2013 03:40
How to debug? ctypes.CDLL('libSystem.dylib')
>>> import ctypes
>>> ctypes.CDLL('libSystem.dylib')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.../lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libSystem.dylib, 6): image not found
@skyl
skyl / gist:7922746
Last active December 31, 2015 02:48
billiard upgrade to 3.3.0.12.tar.gz on OSX
> python
Python 2.7.3 (default, Dec 4 2013, 11:24:08)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import billiard
>>> billiard.VERSION
(2, 7, 3, 31)
>>> ^D
> pip install -U billiard
@skyl
skyl / command line
Last active December 25, 2015 20:09
include+when bug in ansible?
% ansible-playbook pb.yml -i h -e "BOOL=that"
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [wtf] *******************************************************************
ok: [localhost] => {
"msg": "that"
@skyl
skyl / gist:4679760
Last active December 11, 2015 23:49
PyCon Registration Bug
Steps
(Chrome)
#. Login (via google)
#. Go to register
#. Do not select the conference registration radio (corporate/hobbyist/etc) and only buy 1 t-shirt
#. Pay for the t-shirt
#. Land on summary page and it says you are not registered for conference (register here button)
#. Click "register" button.