Skip to content

Instantly share code, notes, and snippets.

Yevhen Viktorov yevgenko

Block or report user

Report or block yevgenko

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

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

g-alonso / compile.php5.3.25.txt
Created Jun 7, 2013
Compile PHP5.3.25, Debian 7
View compile.php5.3.25.txt
See before:
compile.mysql5.6.12.txt & compile.apache2.4.4.txt
Compile php 5.3.25
sudo mkdir /usr/local/php
sudo mkdir /usr/local/php/php_5.3.25
ches / follow_observer_spec.rb
Last active Nov 29, 2018
Example of testing Rails observers in isolation for cross-cutting concerns
View follow_observer_spec.rb
require 'spec_helper'
# Bustle is a pubsub system used for activity streams:
# Here when a person follows another (or a discussion, for instance), the observer wires
# up pubsub between them for future activity notifications. The Follow model knows nothing
# about the implementation choices for the pubsub system.
describe FollowObserver do
subject { FollowObserver.instance }
docwhat / Gemfile
Created Oct 6, 2012
Example of cross-platform Guard support gems
View Gemfile
group :tools do
gem "guard"
gem "guard-bundler"
gem "guard-rspec"
#For detecting changes in the filesystem
gem 'rb-inotify', :require => false
gem 'rb-fsevent', :require => false
#For displaying notices

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
voodootikigod / seriallogger.js
Created Jan 3, 2012
Log all output from a serial port connection to a log file.
View seriallogger.js
Simple example that takes a command line provided serial port destination and routes the output to a file of the same name with .log appended to the port name.
usage: node logger.js /dev/tty.usbserial <baudrate>
var SerialPort = require("serialport");
var fs = require("fs");
var port = process.argv[2];
biilmann / README
Created Nov 8, 2011
Webpop storage module
The Basic Key/Value Store
Extensions now have access to a simple key/value store. To use it require the "storage" module:
var storage = require("storage");
// put an object in the store
storage.put("my-key", {title: "An object", text: "You can store any normal js object in the store});
biilmann /
Created Oct 27, 2011
Webpop Calendar Extension

Calendar Extension

This is a simple calendar extension using Webpop's search API to list events.

To use the extension create a Section with entries enabled and configure the entries to have a "date" field.

Add calendar.js to your extensions folder and set the calendar section to use this extension.

In the template used to display the calendar section, you can list all future events like this:

View php-embedded-server-20110220.patch.diff
Index: sapi/cli/config.w32
--- sapi/cli/config.w32 (revision 308839)
+++ sapi/cli/config.w32 (working copy)
@@ -6,7 +6,8 @@
ARG_ENABLE('cli-win32', 'Build console-less CLI version of PHP', 'no');
if (PHP_CLI == "yes") {
- SAPI('cli', 'php_cli.c', 'php.exe');
+ SAPI('cli', 'php_cli.c php_http_parser.c php_cli_server.c', 'php.exe');
txus / delegate_matcher.rb
Created Feb 2, 2011
RSpec matcher for delegations
View delegate_matcher.rb
# RSpec matcher to spec delegations.
# Usage:
# describe Post do
# it { should delegate(:name).to(:author).with_prefix } # post.author_name
# it { should delegate(:month).to(:created_at) }
# it { should delegate(:year).to(:created_at) }
# end
You can’t perform that action at this time.