Skip to content

Instantly share code, notes, and snippets.

--- a/plugins/sfFormExtraPlugin/lib/widget/sfWidgetFormJQueryDate.class.php
+++ b/plugins/sfFormExtraPlugin/lib/widget/sfWidgetFormJQueryDate.class.php
@@ -90,8 +90,8 @@ class sfWidgetFormJQueryDate extends sfWidgetForm
function wfd_%s_check_linked_days()
{
- var daysInMonth = 32 - new Date(jQuery("#%s").val(), jQuery("#%s").val() - 1, 32).getDate();
- jQuery("#%s option").attr("disabled", "");
+ var daysInMonth = new Date(jQuery("#%s").val(), jQuery("#%s").val(), 0).getDate();
+ jQuery("#%s option").attr("disabled", null);
@capocasa
capocasa / .gtkrc-2.0
Last active January 7, 2016 08:55
Pretty GTK2 theme for i3 on Ubuntu 14.04
gtk-theme-name="Ambiance"
gtk-icon-theme-name="HighContrast"
gtk-font-name="Ubuntu 10"
gtk-cursor-theme-name="DMZ-White"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
I [28/Jun/2016:10:11:53 +0200] Generating printcap /etc/printcap...
I [28/Jun/2016:10:11:53 +0200] Saving subscriptions.conf...
D [28/Jun/2016:10:11:53 +0200] cupsdSetBusyState: newbusy="Not busy", busy="Dirty files"
I [28/Jun/2016:10:11:53 +0200] Expiring subscriptions...
D [28/Jun/2016:10:11:57 +0200] [Client 30] Accepted from localhost:57234 (IPv6)
D [28/Jun/2016:10:11:57 +0200] [Client 30] Waiting for request.
I [28/Jun/2016:10:11:57 +0200] Expiring subscriptions...
D [28/Jun/2016:10:11:57 +0200] [Client 30] POST /admin/ HTTP/1.1
D [28/Jun/2016:10:11:57 +0200] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [28/Jun/2016:10:11:57 +0200] [Client 30] Read: status=200
{"reqId":"RLpdbqC8OTUkIpnAYkbM","remoteAddr":"88.217.180.218","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AutoloadNotAllowedException\",\"Message\":\"Autoload path not allowed: \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files_opds\\\/lib\\\/meta.php\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/autoloader.php(165): OC\\\\Autoloader->isValidPath('\\\/var\\\/www\\\/nextcl...')\\n#1 [internal function]: OC\\\\Autoloader->load('OCA\\\\\\\\Files_Opds\\\\\\\\...')\\n#2 [internal function]: spl_autoload_call('OCA\\\\\\\\Files_Opds\\\\\\\\...')\\n#3 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files_reader\\\/lib\\\/Service\\\/MetadataService.php(24): class_exists('\\\\\\\\OCA\\\\\\\\Files_Opds...')\\n#4 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files_reader\\\/lib\\\/Controller\\\/PageController.php(103): OCA\\\\Files_Reader\\\\Service\\\\MetadataService->get(94866)\\n#5 [internal function]: OCA\\\\Files_Reader\\\\Controller\\\\PageController->showReader()\\n#6 \\\/var\\\/www\\\/nextcloud\\\/l
@capocasa
capocasa / wordpress-change-domain-migration.sql
Created April 10, 2017 10:26 — forked from chuckreynolds/wordpress-change-domain-migration.sql
Use this SQL script when changing domains on a WordPress site. Whether you’re moving from an old domain to a new domain or you’re changing from a development domain to a production domain this will work. __STEP1: always backup your database. __STEP2: change the ‘oldsite.com’ and ‘newsite.com’ variables to your own. __STEP3: make sure your databa…
SET @oldsite='http://oldsite.com';
SET @newsite='http://newsite.com';
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);
/* only uncomment next line if you want all your current posts to post to RSS again as new */
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite);
@capocasa
capocasa / File.sc
Last active July 21, 2017 15:22
Prototyping Gist for File and SoundFile in SuperCollider class library
File {
}
[carlo@roger bitcoin]$ ./configure --disable-tests --disable-hardening --disable-bench --with-gui=no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
Bad news, you have a `QM77 Express Chipset LPC Controller` so you have ME hardware on board and you can't control or disable it, continuing...
Error mapping physical memory 0x0000004275159040 [0x4000] ERRNO=1 Operation not permitted
Could not map RCBA
Error reading RCBA
Delivered-To: [email protected]
Received: by 10.176.83.135 with SMTP id k7csp6194507uaa;
Wed, 28 Feb 2018 06:04:22 -0800 (PST)
X-Received: by 10.31.165.213 with SMTP id o204mr13126704vke.163.1519826662835;
Wed, 28 Feb 2018 06:04:22 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1519826662; cv=none;
d=google.com; s=arc-20160816;
b=xhPvx2TbOalBWNf4Fq5UrTtZ3HTxRnAIku+rO3aQeb212RmNTqxfZ4Hy4GjhUeachT
iYKnIssEu1KKXTd7D4w1Q1RTruNFlIHZoTamUwu/uwcIogjTgsotOwHWTzh7+muD6CkI
GHe1SibtJCmRdzk/ubQgJjcTS4SxNllk23Ly3UDSferDK0OhUbIYQ4d9ubbDt2k+xet9
echo "
import system
type Bar[T] = ref object
value: T
type types = int32|int64 # if I change this to just int32 or int64 it works (compiles)
# if I replace Bar everywhere with seq it also compiles fine