Skip to content

Instantly share code, notes, and snippets.

@rainbat
rainbat / wordpress-change-url.php
Created December 5, 2015 14:14 — forked from lavoiesl/wordpress-change-url.php
PHP script to replace site url in Wordpress database dump, even with WPML
#!/usr/bin/env php
<?php
/**
* PHP script to replace site url in Wordpress database dump, even with WPML
* @link https://gist.github.com/lavoiesl/2227920
*/
if (!empty($argv[1]) && $argv[1] == 'update') {
$file = file_get_contents('https://gist.github.com/lavoiesl/2227920/raw/wordpress-change-url.php');
if ($file === false) {
@rainbat
rainbat / callhistory.sql
Last active March 26, 2018 10:38 — forked from madaboutcode/callhistory.sql
Call history, ios, iphone, query
select datetime(date, 'unixepoch') as dd,address,duration/60,id,
case (flags>>15)&1 when 1 then '1' else '0' end || case (flags>>14)&1 when 1 then '1' else '0' end || case (flags>>13)&1 when 1 then '1' else '0' end || case (flags>>12)&1 when 1 then '1' else '0' end || case (flags>>11)&1 when 1 then '1' else '0' end || case (flags>>10)&1 when 1 then '1' else '0' end || case (flags>>9)&1 when 1 then '1' else '0' end || case (flags>>8)&1 when 1 then '1' else '0' end || case (flags>>7)&1 when 1 then '1' else '0' end || case (flags>>6)&1 when 1 then '1' else '0' end || case (flags>>5)&1 when 1 then '1' else '0' end || case (flags>>4)&1 when 1 then '1' else '0' end || case (flags>>3)&1 when 1 then '1' else '0' end || case (flags>>2)&1 when 1 then '1' else '0' end || case (flags>>1)&1 when 1 then '1' else '0' end || case (flags>>0)&1 when 1 then '1' else '0' end flagbin
, flags, answered from call where duration > 0 and face_time_data IS NULL order by dd desc;