Skip to content

Instantly share code, notes, and snippets.

@tuxity
tuxity / navicat_premium_reset_trial.sh
Last active April 25, 2024 02:44
Reset Navicat Premium 15/16 remaining trial days
#!/bin/bash
set -e
file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist)
regex="CFBundleShortVersionString = \"([^\.]+)"
[[ $file =~ $regex ]]
version=${BASH_REMATCH[1]}
// How do I setup OpenID with Steam?
// =========================
// *OpenID* is an authentication strategy where an unauthenticated user visits
// your site then authenticates themselves by logging in to Google, Twitter,
// Facebook, Steam, or some other *OpenID "provider*. Your server (the
// *OpenID Relying Party*) exchanges keys with the *OpenID Provider* (Google,
// et. al.) then sends the user over to the *OpenID Provider* to log in.
//
// After the user logs in with the *OpenID Provider*, the user is sent back to
// you with some information identifying who they are, signed by the key you
@dun4n
dun4n / vcard.html
Last active February 26, 2024 23:15
#JavaScript vcard generator example
<!doctype html>
<html>
<head>
<script type="text/javascript" src="vcard2.js"></script>
</head>
<body>
<script type="text/javascript">
// With helper methods
var fooBar = vCard.create(vCard.Version.FOUR)
fooBar.addFormattedname("Mr Foo Bar")
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@mathewbyrne
mathewbyrne / slugify.js
Created October 12, 2011 04:34
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}