Skip to content

Instantly share code, notes, and snippets.

<script>
// For date/time picker +1 day after certain time
// https://gist.github.com/carmoreira/3ebf05aa9e31f8ddba3af8e3408ceab6 (plugin author)
jQuery(document).ready(function(){
// get current time with moment - it will have the tz
var date = moment().toDate();
var closetime = moment('18:00','HH:mm').toDate();
// if it's after X pm (24 hr format) then change classes and re-init date pickers
if(date >= closetime){
jQuery('.datefield-ny').removeClass('datefield-ny').addClass('datefield-ny-plus-one');
@sporkman
sporkman / gist:6829ef07576678c884119bb2ee4f3c01
Created February 24, 2018 19:49
setup log - luxembourg
2018-02-24 14:35:47 == WARNING: resetting threads to 1
2018-02-24 14:35:47 == Create DB
2018-02-24 14:35:47 == Setup DB
Postgres version found: 9.5
Postgis version found: 2.4
2018-02-24 14:35:51 == WARNING: external UK postcode table not found.
2018-02-24 14:35:52 == Import data
osm2pgsql version 0.93.0-dev (64 bit id space)
Using projection SRS 4326 (Latlong)
[nominatim@nominatim ~]$ more cmake.log
-- The C compiler identification is Clang 4.0.0
-- The CXX compiler identification is Clang 4.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
/**
* Redirects search results from /?s=query to /search/query/, converts %20 to +
*
* @link http://txfx.net/wordpress-plugins/nice-search/
*/
function roots_nice_search_redirect() {
global $wp_rewrite;
if (!isset($wp_rewrite) || !is_object($wp_rewrite) || !$wp_rewrite->using_permalinks()) {
return;
}
tcp:
4087074914 packets sent
347087161 data packets (629593487659 bytes)
40191 data packets (25514649 bytes) retransmitted
2030 data packets unnecessarily retransmitted
0 resends initiated by MTU discovery
2151735775 ack-only packets (7870887 delayed)
0 URG only packets
53 window probe packets
1576056890 window update packets
363c363,365
<
---
> // BWAY spam days
> if (rcube_find_object('rcmfd_spamdays'))
> rcube_find_object('rcmfd_spamdays').selectedIndex = 0;
559c561
< });
\ No newline at end of file
---
===>>> The following actions will be taken if you choose to proceed:
Install www/redmine
Install devel/rubygem-rake
Install devel/ruby-gems
Install lang/ruby18
Install devel/autoconf
Install misc/help2man
Install devel/p5-Locale-gettext
Install devel/automake
Install devel/automake-wrapper
@sporkman
sporkman / gist:1230782
Created September 21, 2011 00:03
zpool usage
[spork@trunk /tank/backup]$ zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 3.47T 2.38T 1.09T 68% ONLINE -
[spork@trunk /tank/backup]$ zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
tank/backup@2010.01.13-04.09.37 28.9G - 117G -
tank/backup@2010.09.20-01.01.01 18.0G - 242G -
tank/backup@2010.09.27-01.01.00 13.5G - 243G -
tank/backup@2010.10.01-01.01.00 5.67G - 245G -
tank/backup@2010.10.04-01.01.00 8.31G - 245G -
@sporkman
sporkman / gist:1230779
Created September 21, 2011 00:02
snapshot list
[spork@trunk /tank/backup]$ ls -1 .zfs/snapshot/
2010.01.13-04.09.37
2010.09.20-01.01.01
2010.09.27-01.01.00
2010.10.01-01.01.00
2010.10.04-01.01.00
2010.10.11-01.01.00
2010.10.18-01.01.00
2010.10.25-01.01.00
2010.11.01-01.01.00
[spork@trunk ~]$ zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
tank/backup@2010.01.13-04.09.37 27.4G - 117G -
tank/backup@2010.05.24-01.01.00 16.3G - 222G -
tank/backup@2010.05.31-01.01.00 14.9G - 223G -
tank/backup@2010.06.07-01.01.00 14.3G - 223G -
tank/backup@2010.06.14-01.01.00 14.6G - 226G -
tank/backup@2010.06.21-01.01.00 14.4G - 226G -
tank/backup@2010.06.28-01.01.00 12.9G - 227G -
tank/backup@2010.07.01-01.01.00 7.90G - 227G -