Skip to content

Instantly share code, notes, and snippets.

@gagarine
gagarine / id_rsa.pub
Created June 4, 2014 16:32
Simon Perdrisat (gagarine) public key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAu/cwbvj7V5hC6ofinO3e44CfqAMB14T850PTxpSz756eJGv0klkpf+CpI54ZfowNoWrmkcFe0mLwuKTsn03zsCgmI/YtV+91aaCjoM5+/6yMUflc/u42pEtHk48svf337K70LaSfN84yJuqPBzECYvPFU3ev0UHXEhGgyrNNfTeQd4pHu0K8AFTTNE2sRjf07F3cCsx/zOR5LNVyOO3zSakeESCWc20chNfLs7XdMBpU3WoM6OWRbUxPy6BhxSeDY3t9rI+YyWEcqbSv6v5IJLkQsndb4tfYcZWPDbMRTAxChDUrboZrpeyGkYOG7Qe/IQdHrlcNEsWolWLIVfeRtQ== perdrisat@gmail.com
@gagarine
gagarine / screen_color_flash.asm
Last active August 29, 2015 14:23
For comodor 64
processor 6502
org $1000
init_screen
lda #$00
sta $d020
sta $d021
lda #$20 ; #$20 is the spacebar Screen Code
clear
sta $0400,x ; fill four areas with 256 spacebar characters
@gagarine
gagarine / template.php
Created September 24, 2010 13:16
remove Drupal module and core default CSS
<?php
function theme_preprocess_page(&$vars) {
//remove drupal default system CSS (IE can only take 31 CSS files)
$css = drupal_add_css();
$rm_css = array(
'modules/node/node.css',
'modules/poll/poll.css',
'modules/system/defaults.css',
//'modules/system/system.css',
//'modules/system/system-menus.css',
@gagarine
gagarine / drupal-fast-starting-scrit.sh
Created December 25, 2010 16:49
Drupal fast starting script
#Download drupal core
drush dl --drupal-project-rename=PROJECTNAME
cd PROJECTNAME/sites/all/
mkdir modules themes modules/contrib modules/features modules/costum
#Basic
drush dl cck views filefield imagefield imageapi imagecache backup_migrate pathauto token webform webformblock advanced_help diff jquery_ui logintoboggan date content_profile account_profile calendar
@gagarine
gagarine / gist:794193
Created January 24, 2011 23:18
geo field
[field_geo_latlon] => Array
(
[0] => Array
(
[geo] => —ij¢‘ 9@'‡©Ëí/M@
[gis type] => point
[wkb] => —ij¢‘ 9@'‡©Ëí/M@
[wkt] => POINT(25.627222222222 58.374444444444)
[lat] => 23.234234234
[lon] => 2.234234234
; This file was auto-generated by drush_make
core = 7.x
api = 2
projects[drupal][version] = "7.0"
; Profiles
; Please fill the following out. Type may be one of get, cvs, git, bzr or svn,
; and url is the url of the download.
projects[standard][download][type] = ""
@gagarine
gagarine / easybox_sip_passwd.pl
Created July 23, 2011 18:20 — forked from wose/easybox_sip_passwd.pl
arcor/vodafone won't give you your sip password for free, but i will: capture an incoming call (WAN VC2) with the diagnostic tool in your easybox, load the .cap file in wireshark and search for SIP/SDP Request:INVITE, Message Header -> Proxy-Authorization
#!/usr/bin/env perl
use strict;
use warnings;
use Digest::MD5 'md5_hex';
print_usage() unless($#ARGV==5);
my ($method, $uri, $user, $realm, $nonce, $response) = @ARGV;
my $hash_method_uri = md5_hex(join(':', $method, $uri));
<?php
function hook_views_pre_render(&$view) {
if ($view->name == 'ranges_by_room') {
//we order the view by node_node_data_field_pim_offer_title
//and we want the offer information only one time
$preview_offer = FALSE;
foreach ($view->result as $key => $value) {
if ($preview_offer == $view->result[$key]->node_node_data_field_pim_offer_nid) {
unset($view->result[$key]->node_node_data_field_pim_offer_node_data_field_pim_description_field_pim_description_value);
unset($view->result[$key]->node_node_data_field_pim_offer_node_data_field_pim_image_field_pim_image_value);
@gagarine
gagarine / theme.inc
Created August 17, 2011 20:01
views theme.inc arround line 500
<?php
function template_preprocess_views_view_unformatted(&$vars) {
$view = $vars['view'];
$rows = $vars['rows'];
$vars['classes'] = array();
// Set up striping values.
foreach ($rows as $id => $row) {
$row_classes = array();
@gagarine
gagarine / disable_google_fade-in
Created August 23, 2011 13:26
greasmonkey script to Disable Google Fade-in Homepage on background image
// ==UserScript==
// @name Disable Google Fade-in Homepage
// @namespace http://googlesystem.blogspot.com
// @description Disable Google's new homepage
// @include http://www.google.*/
// @include http://www.google.*/webhp*
// @include http://www.google.*/#*
// @include https://www.google.*/
// @include https://www.google.*/webhp*
// @include https://www.google.*/#*