$ echo -n "foobar" | sha1sum | cut -d' ' -f1 | xxd -r -p | base64
$ USR="yourname";PWD="foobar";SALT="$(openssl rand -base64 3)";SHA1=$(printf "$PWD$SALT" | openssl dgst -binary -sha1 | sed 's#$#'"$SALT"'#' | base64); echo "$USR:{SSHA}$SHA1"
#!/usr/bin/env python | |
import sys | |
from PyQt4 import QtCore, QtGui, QtWebKit | |
from ui_mainwindow import Ui_MainWindow | |
class MainWindow(QtGui.QMainWindow, Ui_MainWindow): | |
# Maintain the list of browser windows so that they do not get garbage | |
# collected. | |
_window_list = [] |
#!/usr/bin/env python3 | |
upper_limit = input("Highest number you'd like to go to: ") | |
for x in range(1, int(upper_limit)): | |
if x % 3 == 0 and x % 5 == 0: | |
print('FizzBuzz') | |
elif x % 3 == 0: | |
print('Fizz') | |
elif x % 5 == 0: |
AddEncoding gzip gz | |
RewriteEngine On | |
RewriteCond %{HTTP:Accept-Encoding} gzip | |
RewriteCond %{REQUEST_FILENAME}.gz -f | |
RewriteRule ^(.*)$ $1.gz [QSA,L] | |
<Files *.css.gz> | |
ForceType text/css |
#Given to the public domain | |
#No warranties | |
import urllib2 | |
import simplejson | |
def shorturl(urltoshorten): | |
"""Compress the URL using goo.gl take a look at https://developers.google.com/url-shortener/v1/getting_started | |
>>> shorturl('http://igor.tamarapatino.org') | |
'http://goo.gl/FxHOn' |
#!/usr/bin/env python | |
import copy | |
f = open('weechat.conf', 'r') | |
formats = ['/join ', '/query '] | |
networks = { |
git.io is an awesome URL shortener provided by Github. It works when shortening URLs from *.github.com/* to a small https://git.io/ link.
>>> import requests
My model for assessing trust with people.
#!/usr/bin/env python | |
''' | |
This file contains fake data which may be useful in | |
demonstrating basic principles in Python. | |
''' | |
import random | |
colors = [ | |
'red', |