Skip to content

Instantly share code, notes, and snippets.

View Clone Cleanup Script.js
var gr = new GlideRecord('u_focus_group');
var strQuery = 'u_expiration>=javascript:gs.beginningOfToday()^u_active=true';
while ( {
// Reset user profile and password
var gruser = new GlideRecord('sys_user');
ifthisandthat / fullbackup.php
Created Oct 9, 2014
cPanel Backup Cronjob
View fullbackup.php
Using the script* provided below you will be able to make automatic backup of your hosting account (domains and MySQL databases). This backup script includes SSL support. This is not necessary if you run the script on the server for which you are generating the backup; but the SSL support could be important if you are running the script somewhere else to connect to your cPanel hosting account.
// PHP script to allow periodic cPanel backups automatically, optionally to a remote FTP server.
// This script contains passwords. It is important to keep access to this file secure (we would ask you to place it in your home directory, not public_html)
// You need create 'backups' folder in your home directory ( or any other folder that you would like to store your backups in ).
ifthisandthat / .htaccess
Created Sep 9, 2014
Perishable Press 5G Blacklist
View .htaccess
# @
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (\"|%22).*(<|>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (\\|\.\./|`|=\'$|=%27$) [NC,OR]
ifthisandthat / jquery.plugin.js
Created Mar 19, 2012
jQuery Boilerplate for plugins
View jquery.plugin.js
// keep all your code in a closure
// provide default settings
var defaultSettings = {
position : 'mouse',
color : 'black'
// name your plugin - try to make it unique
ifthisandthat / .sync_things.yaml
Created Nov 15, 2011 — forked from awalker/sync_things.rb
Simple Ruby script to sync Basecamp and Things to-dos.
View .sync_things.yaml
username: your_api_token
password: X
current_user: your_current_user_id (pull it out of your edit URL)
basecamp_project: your_project_id (in URL)
ifthisandthat / .htaccess
Created Oct 1, 2010
301 redirect with match for htaccess
View .htaccess
RedirectMatch 301 ^.*$
ifthisandthat / .htaccess
Created Sep 4, 2010
Kohana v2 .hatccess for Godaddy
View .htaccess
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect application and system files from being viewed
RewriteRule ^(application|modules|system) - [F,L]
# Allow any files or directories that exist to be displayed directly
ifthisandthat / MY_html.php
Created Aug 31, 2010
Extension for Kohana HTML helper
View MY_html.php
<?php defined('SYSPATH') or die('No direct script access.');
class html extends html_Core
* Minify URI Builder
* @param string $href
* @param string $type
* @return string
ifthisandthat / gradient.css
Created Aug 25, 2010
CSS3 Gradient Backgrounds
View gradient.css {
-webkit-gradient(linear, left top, left bottom, from(red), to(white));
-moz-linear-gradient(red, white)
width: 480px;
height: 320px;
ifthisandthat / git_buttons.html
Created Aug 24, 2010
Inspired by the navigation menu on Git. Includes a base64 background image.
View git_buttons.html
ul.tabs {
-moz-border-radius:5px 5px 5px 5px;
-webkit-border-radius:5px 5px 5px 5px;
border:1px solid #DDDDDD;
margin:10px 0 0;
padding:6px 10px;
background:url(data:image/gif;base64,R0lGODlhVwAmAMQAAOjo6Nzc3OTk5OXl5eLi4t/f3+np6ebm5uPj4+Dg4O3t7erq6ufn5+Hh4d7e3uvr6+zs7N3d3QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAABXACYAAAX/oCKOZGmeaKqubOu+cCyPUG3feK7vfO//wKBwSCwaj8jk7sFsOp/QqHRKrVqv2Kx2y+16v2DpYkwum8/otHrNbrvf8Lh8TjbY7/i8fs/v+/+AgYKDhIWGdwCJiouMjY6PkJGSk5AMlpeYmZqbnJ2en6ChoqOkpaaXB6mqq6ytrq+wsbKztLW2t7i5qgO8vb6/wMHCw8TFxsfIycrLzL0Cz9DR0tPU1dbX2NnWCNzd3t/g4eLj5OXm5+jp6uvs3QTv8PHy8/T19vf4+fr7/P3+//AaCBxIsKDBgwgTKlzIsKHDhxAjSpxIsaJFhAkyatzIsaPHjyBDihxJsqTJkyhTW2oswLKly5cwY8qcSbOmzZs4c+rcybOlg59AgwodSrSo0aNIkypdyrSp06dQo0qdWjSC1atYs2rdyrWr169gw4odS7as2bNo06rlGqCt27dw48qdS7eu3bt0QwAAOw==) repeat-x scroll 0 0 transparent;