For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| module ApplicationHelper | |
| # Shaun Inman's original Widon't | |
| # http://shauninman.com/archive/2006/08/22/widont_wordpress_plugin | |
| # | |
| # @param [String] text the text to apply Widon't to | |
| # @return [String] the text with Widon't applied | |
| def widont(text) | |
| text.strip! | |
| text[text.rindex(' '), 1] = ' ' if text.rindex(' ') |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <netinet/in.h> |
| ּ_בּ | |
| בּ_בּ | |
| טּ_טּ | |
| כּ‗כּ | |
| לּ_לּ | |
| מּ_מּ | |
| סּ_סּ | |
| תּ_תּ | |
| ٩(×̯×)۶ | |
| ٩(̾●̮̮̃̾•̃̾)۶ |
| # Move this file to ~/.config/pianobar/config | |
| # User | |
| user = PANDORA_USERNAME | |
| password = PANDORA_PASSWORD | |
| # Change this to where your scrobble.py file is | |
| event_command = ~/.config/pianobar/scrobble.py |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| /* | |
| * Property prefix hacks | |
| */ | |
| /* IE6 only - any combination of these characters */ | |
| _ - £ ¬ ¦ | |
| /* IE6/7 only - any combination of these characters */ |
| #!/bin/bash | |
| function jsonval { | |
| temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
| echo ${temp##*|} | |
| } | |
| json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
| prop='profile_image_url' | |
| picurl=`jsonval` |
| urlencode() { | |
| # urlencode <string> | |
| old_lc_collate=$LC_COLLATE | |
| LC_COLLATE=C | |
| local length="${#1}" | |
| for (( i = 0; i < length; i++ )); do | |
| local c="${1:$i:1}" | |
| case $c in |
| # lib/custom_logger.rb | |
| class CustomLogger < Logger | |
| def format_message(severity, timestamp, progname, msg) | |
| "#{timestamp.to_formatted_s(:db)} #{severity} #{msg}\n" | |
| end | |
| end | |
| logfile = File.open("#{Rails.root}/log/custom.log", 'a') # create log file | |
| logfile.sync = true # automatically flushes data to file | |
| CUSTOM_LOGGER = CustomLogger.new(logfile) # constant accessible anywhere |