Skip to content

Instantly share code, notes, and snippets.

View danmichaelo's full-sized avatar

Dan Michael O. Heggø danmichaelo

View GitHub Profile
@curita
curita / scrapy-0.24.py
Created March 19, 2015 05:37
item_scrapped signal
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import scrapy
from scrapy import signals, log
from scrapy.crawler import Crawler
from scrapy.xlib.pydispatch import dispatcher
from scrapy.utils.project import get_project_settings
from twisted.internet import reactor
@gpickin
gpickin / 02_jshint.js
Created March 18, 2015 22:14
Cordova Hook for /hooks/before_prepare/
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var jshint = require('jshint').JSHINT;
var async = require('async');
var foldersToProcess = [
'js', 'js/services'
];
@aurimasv
aurimasv / hyphenateISBN.js
Last active January 2, 2023 01:49
Hyphenates ISBN numbers using tables generated by https://gist.github.com/aurimasv/6693503
/*
ISBN hyphenation using tables generated by https://gist.github.com/aurimasv/6693503
Includes tables generated on 2013-09-24
***** BEGIN LICENSE BLOCK *****
Copyright © 2013 Aurimas Vinckevicius (aurimas.dev~at~gmail.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active March 24, 2025 17:40
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@acg
acg / csv2tsv
Created April 4, 2013 17:14
Convert csv to tsv with optional escaping.
#!/usr/bin/env perl
use Text::CSV;
use Getopt::Long qw/ GetOptionsFromArray :config pass_through /;
use warnings;
use strict;
my $usage = "usage: $0 [-e] < file.csv\n";
exit main( @ARGV );
@padde
padde / gist:2623647
Created May 6, 2012 18:23
Convert video for PowerPoint with ffmpeg
ffmpeg -i INFILE -r 25 -f mpeg -vcodec mpeg1video -ar 48000 -b 1500k -acodec mp2 -ar 44100 -ac 1 -y OUTFILE.mpg
@pol
pol / wos.php
Created October 27, 2011 18:31
Web of Science SOAP Test
<?php
$auth_url = "http://search.isiknowledge.com/esti/wokmws/ws/WOKMWSAuthenticate?wsdl";
$auth_client = @new SoapClient($auth_url);
$auth_response = $auth_client->authenticate();
print_r($auth_response);
echo "REQUEST HEADERS:\n" . $auth_client->__getLastRequestHeaders() . "\n";
$search_url = "http://search.isiknowledge.com/esti/wokmws/ws/WokSearchLite?wsdl";