Skip to content

Instantly share code, notes, and snippets.

Avatar

Wes Roberts jchook

  • Meter AI, Inc.
  • Lancaster, PA
View GitHub Profile
@nrk
nrk / predis-0_6_3-relnotes.markdown
Created Jan 1, 2011
Predis 0.6.3 (2011-01-01) - Release notes
View predis-0_6_3-relnotes.markdown

Predis 0.6.3 (2011-01-01) - Release notes

Predis is a flexible and feature-complete PHP client library for Redis. This is a maintenance release for the 0.6 series that features support for check and set (CAS) operations using the Predis\MultiExecBlock abstraction for MULTI/EXEC transactions and the addition of the remaining commands that will be part of Redis 2.2 (now in the RC stage). As with previous releases, Predis is also available for PHP 5.2 with an officially supported backport (PHP >= 5.2.6). What follows is an overview of the new features introduced in this new release. For a more in-depth list of changes please see the CHANGELOG.

New features and changes

Transactions with CAS support

@v1nc3ntlaw
v1nc3ntlaw / rbenv-install-system-wide.sh
Last active Feb 4, 2017
rbenv install ruby 1.9.3-p448 on Debian 6 Squeeze
View rbenv-install-system-wide.sh
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
View languagetool
#!/bin/sh
#
# init script for a Java application
#
# Check the application status
#
# This function checks if the application is running
check_status() {
@benjie
benjie / README.md
Last active Nov 27, 2018
Long Live CoffeeScript and Long Live ES6
View README.md

Long Live CoffeeScript and Long Live ES6

Clearly ES6 is a huge improvement over ES5, and tools like [6to5][] allow us to use these cool features now. I was reading [Replace CoffeeScript with ES6][replace coffeescript] by [Blake Williams][] and thought it was a great summary of how ES6 solves many of the same problems that CoffeeScript solves; however I'd like to comment on a few of Blake's points and talk about why I'll be sticking with CoffeeScript.

Classes

Classes in ES6 (like many of the syntax changes in ES6) are very similar to the CoffeeScript equivalent. To support browsers that are not fully ES5 compliant (e.g. IE8-), however, we still can't really use getters/setters, so ignoring these the comparison is:

@ircmaxell
ircmaxell / equality.php
Last active Apr 19, 2019
Unicode Set Functions
View equality.php
<?php
const ✓ = true;
const ✕ = false;
function ≠($left, $right) {
return $left != $right;
}
function ≅($left, $right) {
View Webpack 2.0.7-beta vs Rollup
❯ rollup --version
rollup version 0.25.3
❯ time rollup -c ./rollup.js
rollup -c ./rollup.js 4.65s user 0.22s system 118% cpu 4.131 total
❯ time webpack
Hash: ebb00bbccd954c114d3c
Version: webpack 2.0.7-beta
Time: 3623ms
@un1ko85
un1ko85 / new_gist_file.sh
Created May 10, 2013
Starting and stopping NginX / MySQL / PHP-FPM on Mac OS X
View new_gist_file.sh
#! /bin/bash
MYSQL="/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper"
NGINX="/opt/local/sbin/nginx"
PHPFPM="/opt/local/sbin/php-fpm"
PIDPATH="/opt/local/var/run"
MEMCACHED="/opt/local/bin/memcached -m 24 -P /opt/local/var/run/memcached.pid -u root"
if [ $1 = "start" ]; then
sudo $MYSQL start
echo "Starting php-fpm ..."
View SublimeText.java
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Date;
import java.util.Random;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@boTux
boTux / update-blocklists.sh
Last active Jun 22, 2020
Fetch, Merge, and Strip Blocklists from url list
View update-blocklists.sh
#!/bin/bash
# Sync Blocklists.
# by boTux.
# inspired by :
# https://gist.github.com/raidzero/9202581#file-blocklist-update-sh
# https://gist.github.com/jult/e76c628899bd5aa3c33a
# Add cron :
# tout les jours a 05:00
@guiniol
guiniol / background-xdg-open.sh
Last active Dec 25, 2020
offlineimap + notmuch + mutt + gpg + mstmp
View background-xdg-open.sh
#!/bin/bash
xdg-open "$1" &
sleep 1