Skip to content

Instantly share code, notes, and snippets.

View pascaldevink's full-sized avatar
💭
Recruiters: stop looking at my profile

Pascal de Vink pascaldevink

💭
Recruiters: stop looking at my profile
View GitHub Profile
//we changed this function so you can add a class 'ignore-link' to an element
//this way the click is registered, but not followed
function ns_onclick(i, b, c, h, j) {
var e = "";
if (typeof ns_pixelUrl == "string") {
e = ns_pixelUrl.substring(0, ns_pixelUrl.indexOf("?") + 1)
}
e += c;
e += "&ns_type=" + h + "&ns_action=view";
e += "&ns__t=" + (new Date()).getTime();
@pascaldevink
pascaldevink / gist:6790923
Created October 2, 2013 08:55
Hubot dependency tree
├── date-utils@1.2.14
├─┬ githubot@0.4.1
│ ├── async@0.2.9
│ └── scoped-http-client@0.9.8
├── gitio@1.0.1
├─┬ hubot@2.6.3
│ ├── coffee-script@1.6.3
│ ├─┬ express@3.3.4
│ │ ├── buffer-crc32@0.2.1
│ │ ├─┬ commander@1.2.0
@pascaldevink
pascaldevink / gist:6790914
Created October 2, 2013 08:54
Hubot request var
{ socket:
{ _handle:
{ writeQueueSize: 0,
owner: [Circular],
onread: [Function: onread] },
_pendingWriteReqs: 1,
_flags: 0,
_connectQueueSize: 0,
destroyed: false,
errorEmitted: false,
BOOL is_Object(const id b)
{
if (b != nil) {
if (b->isa != (id)0x0) {
if (b->isa!= (id)0x7f) {
if (b->isa!= (id)0x7f7f7f7f) {
return YES;
}
}
}
@pascaldevink
pascaldevink / rml_config.inc.php
Last active December 10, 2015 14:58
Not something I want to see in my codebase
/*
* Beware, that this is not for the faint of heart!
* No documentation is provided. New versions of <redacted> will not feature
* upgradescripts, this must be done by hand.
*/
@pascaldevink
pascaldevink / scrollspy.js
Created April 13, 2012 20:53
ScrollSpy in pure javascript
/*
Copyright (C) 2021 Pascal de Vink (Tweakers.net)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@pascaldevink
pascaldevink / tweakers_old_carrousel.js
Created October 31, 2011 18:20
Tweakers old carrousel
// ==UserScript==
// @name Tweakers.net old carrousel
// @namespace http://tweakers.net
// @include http://tweakers.net/
// @include http://www.tweakers.net/
// ==/UserScript==
var $;
(function(){
if (typeof unsafeWindow.jQuery == 'undefined') {
@pascaldevink
pascaldevink / configuration.php
Created June 16, 2011 13:28
Orchestra configuration solution
class Configuration
{
private static $connection;
/**
* @static
* @return array
*/
public static function getConfig()
{
@pascaldevink
pascaldevink / gist:993131
Created May 26, 2011 13:26
Logrolling in symfony 1
Put this in your ProjectConfiguration.class.php:
sfConfig::set('sf_log_date', date('Y-m-d'));
And in factories.yml:
prod:
logger:
class: sfAggregateLogger
param:
session_name: vvd_website
level: err
@pascaldevink
pascaldevink / symfony-deploy-task-keyfile
Created November 17, 2010 15:21
Add support for custom keyfile names for the SSH command to use
Index: sfProjectDeployTask.class.php
===================================================================
--- sfProjectDeployTask.class.php (revision 79869)
+++ sfProjectDeployTask.class.php (working copy)
@@ -35,6 +35,7 @@
new sfCommandOption('go', null, sfCommandOption::PARAMETER_NONE, 'Do the deployment'),
new sfCommandOption('rsync-dir', null, sfCommandOption::PARAMETER_REQUIRED, 'The directory where to look for rsync*.txt files', 'config'),
new sfCommandOption('rsync-options', null, sfCommandOption::PARAMETER_OPTIONAL, 'To options to pass to the rsync executable', '-azC --force --delete --progress'),
+ new sfCommandOption('key-file', null, sfCommandOption::PARAMETER_OPTIONAL, 'Path to the key you want to use for the SSH connection (if not the standard key)'),
));