Skip to content

Instantly share code, notes, and snippets.

@justinkelly
justinkelly / Synology_Notes_UI.user.js
Last active November 14, 2023 23:27
Synology Notes UI update using TamperMonkey, install Tampermonkely extension in your browser, then click the Raw button on this page to install the script
// ==UserScript==
// @name Synology Notes UI
// @homepage https://github.com/justinkelly/Synology-Notes-UI-update-tampermonkey
// @version 0.2.8
// @description Make Synology Notes UI look similar to Notion
// @author Justin Kelly
// @include https://*/?launchApp=SYNO.SDS.NoteStation.Application*
// @icon https://global.download.synology.com/download/Package/img/NoteStation/2.6.1-2450/thumb_256.png
// @namespace https://github.com/justinkelly/Synology-Notes-UI-update-tampermonkey
// @supportURL https://github.com/justinkelly/Synology-Notes-UI-update-tampermonkey
@justinkelly
justinkelly / mobile.apache.conf
Created July 30, 2012 04:28
Apache mobile detect config
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge\ |maemo|meego.+mobile|midp|mmp|netfront|opera\ m(ob|in)i|palm(\ os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows\ (ce|phone)|xda|xiino [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a\ wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r\ |s\ )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1\ u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(\ i|ip)|hs\-c|ht(c(\-|\ |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(\ |\-|\/)|ibro|idea|ig01|ikom|im1k|inno
// ==UserScript==
// @name EA Website testing
// @homepage https://gist.github.com/justinkelly/fa696fe79d31b6c3a04554e2221d5ad4
// @version 0.1.4
// @description EA testing
// @author Justin Kelly
// @include https://latte.nonprod.digital*
// @include https://mocha.nonprod.digital*
// @include https://preprod.nonprod.digital*
// @include https://www.energyaustralia.com.au*
@justinkelly
justinkelly / randomCode.php
Created January 20, 2012 11:51
Simple PHP function to generate a random apha-numeric code with only readable characters
<?php
/*
* Simple PHP function to generate a random apha-numeric code with only readable characters
*/
function randomCode($length=4) {
/* Only select from letters and numbers that are readable - no 0 or O etc..*/
$characters = "23456789ABCDEFHJKLMNPRTVWXYZ";
@justinkelly
justinkelly / .htaccess
Created January 5, 2012 12:19
Exclude file/directories/urls from Apache .htaccess password protected site
AuthType Basic
AuthName "Auth Required"
AuthUserFile /path/to/.htpasswd
Require valid-user
# allow public access to the following resources
SetEnvIf Request_URI "(path/to/directory/)$" allow
SetEnvIf Request_URI "(path/to/file\.phpt)$" allow
SetEnvIf Request_URI "(util)$" allow
Order allow,deny
Allow from env=allow
@justinkelly
justinkelly / apache trac config file
Created October 19, 2010 01:07
Trac wsgi file TRAC_ENV_PARENT_DIR
##depengind how you want to structure your trac urls
# WSGIScriptAliasMatch ^/users/([^/]+) /var/trac/trac.wsgi
WSGIScriptAlias /trac /var/trac/trac.wsgi
## If using htpasswd auth you will need
# <Location "/trac/login">
# AuthType Basic
# AuthName "Trac"
# AuthUserFile /home/justin/public_html/bzr.bz/private/trac/.htpasswd
# Require valid-user
@justinkelly
justinkelly / cataloguesearches2016-2017slq.csv
Created April 5, 2019 04:20
VALA TechCamp 2019 - Justin Kelly
We can't make this file beautiful and searchable because it's too large.
string,instances
(ebookebl) OR (ebookpac) OR (ebookht) OR (ebookqm) OR (ebookqmp) OR (ebooks or ebooktb),21498
10,19522
business intelligence blog,19269
business studio,19110
Cairns,11719
slq indigenous languages project,11115
timber buildings,9773
public places,8532
christmas,7346
@justinkelly
justinkelly / simple_encrypt.php
Created September 16, 2011 13:47
Simple mcrypt encrypt & decrypt functions for PHP
<?php
$salt ='whatever_you_want'
function simple_encrypt($text)
{
return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
}
function simple_decrypt($text)
a:1:{i:0;b:0;s:23:"onepress_hcl1_largetext";s:91:"I love <span class='js-rotating'>brush lettering | hand lettering | drinking coffee!</span>";s:23:"onepress_hcl1_smalltext";s:156:"Enjoy learning Brush Lettering at one of my Brisbane Workshops. Practice letter forms &amp; different hand styles at one of my bi-monthly self-led meet-ups.";s:22:"onepress_primary_color";s:6:"1aa3af";s:23:"onepress_hcl1_btn1_text";s:5:"About";s:23:"onepress_hcl1_btn2_text";s:33:"Brush Lettering Workshop Bookings";s:24:"onepress_hcl1_btn1_style";s:21:"btn-secondary-outline";s:24:"onepress_hcl1_btn2_style";s:17:"btn-theme-primary";s:30:"onepress_section_order_styling";a:15:{i:0;a:19:{s:6:"add_by";s:0:"";s:5:"title";s:14:"Call to Action";s:10:"section_id";s:3:"cta";s:12:"show_section";i:1;s:15:"section_inverse";i:1;s:8:"subtitle";s:0:"";s:7:"bg_type";s:5:"color";s:8:"bg_color";s:13:"rgba(0,0,0,1)";s:8:"bg_image";a:2:{s:3:"url";s:0:"";s:2:"id";s:0:"";}s:8:"bg_video";a:2:{s:3:"url";s:0:"";s:2:"id";s:0:"";}s:13:"bg_video_webm";a:2:{s:3:
@justinkelly
justinkelly / Google Apps SRV records :: DNS
Created October 5, 2010 03:10
Google Apps SRV records :: DNS
; SRV
_jabber._tcp.@ 1 IN SRV 5 0 5269 xmpp-server.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server4.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server2.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server1.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server3.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 5 0 5222 talk.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 50 0 5222 talk4.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 5 0 5222 talk1.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 20 0 5222 talk3.l.google.com