Skip to content

Instantly share code, notes, and snippets.

View zrod's full-sized avatar
💻
Refactoring https://donating.io

Rodrigo zrod

💻
Refactoring https://donating.io
View GitHub Profile
package feriado
import (
"fmt"
"github.com/go-chat-bot/bot"
"github.com/go-chat-bot/plugins/web"
"time"
)
const (
var React = require('react'),
ReactDOM = require('react-dom');
class UserLocation extends React.Component {
constructor(props, geoWatchId, lat, lng) {
super(props);
// Internal vars
this.geoWatchId = geoWatchId ? geoWatchId : null;
this.lat = lat ? lat : null;
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: "/var/lib/mongodb"
engine: "wiredTiger"
wiredTiger:
@zrod
zrod / 50-synaptics-t440s.conf
Created September 4, 2015 03:20
t440s with t450s trackpad
Section "InputClass"
#Identifier "touchpad catchall"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TPPS/2 IBM TrackPoint|SynPS/2 Synaptics TouchPad|ThinkPad Extra Buttons"
MatchDevicePath "/dev/input/event*"
#Option "SoftButtonAreas" "60% 0 0 2400 40% 60% 0 2400"
Option "AreaTopEdge" "2400"
Option "HorizHysteresis" "30"
Option "VertHysteresis" "30"
$ cat /etc/X11/xorg.conf.d/51-trackpoint.conf
Section "InputClass"
Identifier "evdev pointer catchall"
Driver "evdev"
Option "EmulateWheel" "1"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "0"
Option "XAxisMapping" "6 7"
Option "YAcisMapping" "4 5"
@zrod
zrod / php-br.py
Created May 11, 2015 17:57
php-br.py modulo para willie
# coding=utf8
"""
php-br.py - Pega informacoes do www.php-br.org
"""
from __future__ import unicode_literals
import json
import willie.web as web
import willie.module
@willie.module.commands('artigo')
[
{
"class": "sidebar_label",
"font.bold": false,
"font.face": "Lucida Grande",
"font.size": 11
},
{
"class": "sidebar_label",
"parents": [{"class": "tree_row", "attributes": ["expandable"]}],
# Replaces PgUp with Home
xmodmap -e "keycode 112 = Home NoSymbol Home"; xmodmap -e "keycode 110 = Prior NoSymbol Prior"
# Replaces PgDn with End
xmodmap -e "keycode 117 = End NoSymbol End"; xmodmap -e "keycode 115 = Next NoSymbol Next"
# Apply changes
xmodmap -pke > .Xmodmap
cd ~
echo "xmodmap .Xmodmap" > .xinitrc
<?php
$resultSetMapping = new ResultSetMapping();
$resultSetMapping->addEntityResult('MyAppBundle:Phone', 'p');
$resultSetMapping->addFieldResult('p', 'id', 'id');
$resultSetMapping->addFieldResult('p', 'master_id', 'masterId');
$resultSetMapping->addFieldResult('p', 'slug', 'slug');
$resultSetMapping->addFieldResult('p', 'price', 'price');
$resultSetMapping->addFieldResult('p', 'name', 'name');
$query = $this->getEntityManager()->createNativeQuery('
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.