Skip to content

Instantly share code, notes, and snippets.

@evert
evert / 00-email-to-google.md
Last active October 21, 2018 13:05
Email to google about carddav issues.

Context: This is the email I sent google, listing issues I came across when working with their carddav server. More information in this blogpost. I reformatted and redacted the email to protect people's privacy.

Hello redacted,

You may have figured it from the other emails, but we are currently working on providing a syncronization tool with Google's new CardDAV server. We've run into a number of issues that are definitely bugs, and looking for some advise in a different area.

I would much appreciate it if you could take a look at these, but I'd also completely understand if you're busy. Regardless, I feel that this information may be helpful for you, because I feel I will not the last to mention them

@evert
evert / copyright_update
Last active December 31, 2015 16:44
Update sabre/dav copyrights with sed
{
"email": "[email protected]",
"basicAuth": {
"userName": "6aJLC9SCpNpjXsWWQu69aRkQW9A2XA1ZH5d4dQsU7Phh.2vNSupMEg",
"password": "1U8VAfh0mkI8SoRegXqj50gTE9VTpleCDn4LiD564hy7TXuyNC6RFg",
"expires": 1395806514
},
"links": {
"addressbook-home-set": "\/~evert\/fruux\/fruux-ent\/public\/server.php\/addressbooks\/users\/4\/",
"current-user-principal": "\/~evert\/fruux\/fruux-ent\/public\/server.php\/principals\/users\/4\/"

I hereby claim:

  • I am evert on github.
  • I am evert (https://keybase.io/evert) on keybase.
  • I have a public key whose fingerprint is 107B AA3F EC16 5B36 2AA3 B1A0 7140 EC0B 6D75 CC9B

To claim this, I am signing this object:

{
@evert
evert / gist:6058362
Last active December 20, 2015 02:39
CURLOPT_POSTREDIR
--- original.xml 2013-07-23 00:42:13.000000000 +0200
+++ next.xml 2013-07-23 00:37:10.000000000 +0200
@@ -580,6 +580,26 @@
</entry>
</row>
<row>
+ <entry valign="top"><constant>CURLOPT_POSTREDIR</constant></entry>
+ <entry valign="top">
+ <para>
+ Set the behavior for following redirects with
<?php
$a = 1;
$b = 2;
$c = 3;
list($a, $b, $c) = false;
var_dump([
$a, $b, $c
@evert
evert / hr.html
Created May 29, 2013 19:33
My whole life has been leading up to this moment.
<!DOCTYPE html>
<head>
<title>This is it</title>
<meta charset="utf-8" />
<style type="text/css">
hr {
border: 0px;
}
@evert
evert / wordstuff.php
Created November 21, 2012 12:30
Words With Enemies
<?php
if ($argc < 2) {
echo "Usage: \n";
echo "\n";
echo "1. Wait till you get an invite for a silly wordgame\n";
echo "2. execute $argv[0] [letters]\n";
echo "3. Win\n";
die();
$tree = array(
new Sabre_DAV_SimpleCollection('principals' , array(
new Sabre_CalDAV_Principal_Collection($backend, 'principals/projects'),
new Sabre_CalDAV_Principal_Collection($backend, 'principals/users'),
));
);
@evert
evert / alarmexpand.php
Created April 13, 2012 09:32
Expanding events manually based on alarm range
<?php
function alarmExpand(Sabre_VObject_Component_VCalendar $calendar, DateTime $start, DateTime $end) {
// You should adjust these to be more reasonable
$startScan = new DateTime('1995-01-01');
$endScan = new DateTime('2030-01-01');
$newEvents = array();