Skip to content

Instantly share code, notes, and snippets.

View kayhadrin's full-sized avatar

David kayhadrin

  • AU-US in betweener
View GitHub Profile
/*\
|*|
|*| :: cookies.js ::
|*|
|*| A complete cookies reader/writer framework with full unicode support.
|*|
|*| https://developer.mozilla.org/en-US/docs/DOM/document.cookie
|*|
|*| This framework is released under the GNU Public License, version 3 or later.
|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html
/**
* unformat method: reverse formatting
* @author Markus J Doetsch [email protected]
*/
window.unformat = function (formatting, val) {
"use strict";
// only work with (formatted) strings
if (typeof val !== 'string') {
@martijnvermaat
martijnvermaat / ssh-agent-forwarding-screen.md
Created December 21, 2013 15:06
SSH agent forwarding and screen

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

@blakehaswell
blakehaswell / Gruntfile.js
Created January 21, 2013 10:05
Gruntfile for running automated tests using Jasmine.
module.exports = function (grunt) {
grunt.initConfig({
connect: {
jasmine: {
options: {
hostname: 'localhost',
port: 9001
}
}
@rcorreia
rcorreia / drag_and_drop_helper.js
Last active February 16, 2025 12:05
drag_and_drop_helper.js
(function( $ ) {
$.fn.simulateDragDrop = function(options) {
return this.each(function() {
new $.simulateDragDrop(this, options);
});
};
$.simulateDragDrop = function(elem, options) {
this.options = options;
this.simulateEvent(elem, options);
};