Skip to content

Instantly share code, notes, and snippets.

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\9bis.com\KiTTY\Sessions\Default%20Settings]
"Colour21"="255,255,255"
"Colour20"="245,222,179"
"Colour19"="200,240,240"
"Colour18"="0,217,217"
"Colour17"="179,146,239"
"Colour16"="174,129,255"
$('#'+$(this).attr('name')+'_'+name, this)
.not('fieldset')
.closest('div:not([class*="selectric"])')
.add('fieldset#'+$(this).attr('name')+'_'+name, this)
@ABM-Dan
ABM-Dan / assign.php
Last active December 23, 2015 15:57
<?php
// Version 1
if ($condition) {
$variable = functionOne();
} else {
$variable = functionTwo();
}
$otherVariable = functionThree($variable);
// Version 2
eth0 Link encap:Ethernet HWaddr 00:50:56:3E:7A:73
inet addr:192.168.98.128 Bcast:192.168.98.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe3e:7a73/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:41 errors:0 dropped:0 overruns:0 frame:0
TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5692 (5.5 KiB) TX bytes:7350 (7.1 KiB)
lo Link encap:Local Loopback
DEVICE=eth0
HWADDR=00:50:56:3e:7a:73
TYPE=Ethernet
UUID=6fb710cb-1218-42d1-b10e-454e985b2d05
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
function submitRequest() {
var request = {};
if (query['sort'])
request['sort'] = query['sort'];
if (query['order'])
request['order'] = query['order'];
$.extend(request, query['parameters'], query['filters']);
request = $.param(request);
var selectricOptions = {
disableOnMobile: false,
onInit: function () {
var label, selectedClass, selectricWrapper;
selectricWrapper = $(this).parents('.selectric-wrapper');
selectedClass = selectricWrapper.find('option:selected').attr('class');
label = selectricWrapper.find('.label');
label.addClass(selectedClass);
if ($(this).data('placeholder')) {
return label.text($(this).data('placeholder'));
@ABM-Dan
ABM-Dan / xdebug.sh
Last active January 14, 2016 17:06 — forked from maurotdo/xdebug.sh
Extended version of a bash script to turn xdebug on or off, it automatically restarts php-fpm after.
#!/bin/bash
#
# Script to turn xdebug on and off
# Permission to copy and modify is granted under the MIT license
# Last revised 2014-03-07
# Mauro Maggi <maurotdo (at) gmail (dot) com>
PHP=$(which php)
XDEBUG=$($PHP -i | grep -i xdebug | grep -i enabled)
INI=$($PHP -i | grep "xdebug.ini" | tr -d ',')
// Implements a works-as-you-expect version of .change on radio buttons
(function ($) {
$.fn.fixChange = function (callable) {
return this.each(function () {
return $('[name[' + $(this).name + ']').change(callable.call($(this)))
});
};
}(jQuery));
// Implements a works-as-you-expect version of .change on radio buttons
(function ($) {
$.fn.onTrueChange = function (callable) {
return this.each(function () {
var caller = $(this);
caller.data('cached-value', caller.is(':checked'));
return caller.closest('form').find('input[name="' + caller.attr('name') + '"]').change(function(){
if (caller.is(':checked') != caller.data('cached-value')){
caller.data('cached-value', caller.is(':checked'));
callable.call(caller);