Skip to content

Instantly share code, notes, and snippets.

@odan
odan / xampp_php7_xdebug.md
Last active June 28, 2024 12:58
Installing Xdebug for XAMPP
@ryanwinchester
ryanwinchester / bitwise.php
Last active May 22, 2024 11:19
BITWISE FLAGS for Custom PHP Objects
<?php
/**
* BITWISE FLAGS for Custom PHP Objects
*
* @link http://php.net/manual/en/language.operators.bitwise.php#108679
*
* Sometimes I need a custom PHP Object that holds several boolean TRUE or FALSE values.
* I could easily include a variable for each of them, but as always, code has a way to
* get unweildy pretty fast. A more intelligent approach always seems to be the answer,
@erikvanzijst
erikvanzijst / gist:8851082
Created February 6, 2014 19:35
Automate Bitbucket issue tracker exports
$ # initiate export, will return 202:
$ curl -u evzijst:passwd -X POST -v https://api.bitbucket.org/1.0/repositories/evzijst/interruptingcow/issues/export
[...]
< HTTP/1.1 202 ACCEPTED
[...]
$ # poll for status updates:
$ curl -u evzijst:passwd -X GET https://api.bitbucket.org/1.0/repositories/evzijst/interruptingcow/issues/export
{"status": "ACCEPTED", "count": "1", "total": "4", "phase": "Issues", "pct": "25"}
$ # until it's ready:
$ curl -u evzijst:passwd -X GET https://api.bitbucket.org/1.0/repositories/evzijst/interruptingcow/issues/export
package org.apache.spark.examples
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.rdd.RDD
import java.util.Random
import scala.collection.mutable
import org.apache.spark.serializer.KryoRegistrator
import com.esotericsoftware.kryo.Kryo
@izazueta
izazueta / visor-archivos-online.md
Last active July 20, 2023 09:32
Google Docs Viewer & Office Web Apps Viewer

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)