Skip to content

Instantly share code, notes, and snippets.

searbe

Block or report user

Report or block searbe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@searbe
searbe / gulpfile.js
Created Aug 20, 2017
gulp & rollup without breaking gulp streams
View gulpfile.js
const gulp = require('gulp');
const uglify = require('gulp-uglify');
const sourcemaps = require('gulp-sourcemaps');
const buble = require('rollup-plugin-buble');
const commonjs = require('rollup-plugin-commonjs');
const nodeResolve = require('rollup-plugin-node-resolve');
const rollup = require('rollup-stream');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
@searbe
searbe / kubernetes-datadog-daemonset-configuration.yaml
Created Feb 24, 2017
Datadog Kubernetes Daemonset with configurable Kubernetes gauges
View kubernetes-datadog-daemonset-configuration.yaml
kind: ConfigMap
apiVersion: v1
metadata:
name: dd-agent-config
namespace: default
data:
kubernetes-config: |-
init_config:
instances:
- port: 4194
@searbe
searbe / parse_xlsx.php
Created Aug 7, 2012
Parse simple XLSX in PHP with SimpleXML and ZipArchive
View parse_xlsx.php
<?php
/**
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!)
* but the usual tools were hitting the memory limit pretty quick. I found that
* manually parsing the XML worked pretty well. Note that this, most likely,
* won't work if cells contain anything more than text or a number (so formulas,
* graphs, etc ..., I don't know what'd happen).
*/
@searbe
searbe / watch_assets.sh
Created May 17, 2012
Automatically install public resources from Symfony2 bundles when a file changes
View watch_assets.sh
#!/bin/bash
# Useful when you're making lots of changes in bundle/Resources/public and want
# to see the changes quickly in your browser.
# chmod +x the file then call the command like `./watch_assets.sh`
# Make sure you're in the project root directory (the one containing app, src etc)
if [ -z `which inotifywait` ] ; then
echo "You must install inotify-tools to use watch_assets"
exit 1
You can’t perform that action at this time.