Skip to content

Instantly share code, notes, and snippets.

View oroce's full-sized avatar

Róbert Oroszi oroce

  • Budapest, Hungary
View GitHub Profile
@oroce
oroce / basic-usage.js
Last active April 1, 2017 15:12
This is just a proof of concept demo to parse haproxy log and put into Google Analytics.
var haproxyLog = new HaProxyLog({
port: process.env.PORT||3333
});
haproxyLog
.on( "up", console.log.bind( console, "Server is up" ) )
.on( "down", console.log.bind( console, "Server is down" ) )
.on( "backend-down", console.log.bind( console, "Backend is down" ) )
.on( "access-log", console.log.bind( console, "access log entry:" ) )
.on( "raw", function( message ){console.log( "this is the raw message:", message.toString() ) });
@oroce
oroce / index.html
Last active February 28, 2017 12:51
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<!-- put markup and other contents here -->
@oroce
oroce / _for iOS users
Created November 2, 2011 18:20
Appcelerator share to native facebook, twitter
This gist is only for Android.
If you would like launch native apps
on iPhone, iPad, you can find information about it in Appcelerator Docs:
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.canOpenURL-method.html
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.openURL-method.html
More info about iOS URL Schemes: http://handleopenurl.com/
@oroce
oroce / esnextbin.md
Last active November 22, 2016 20:05
esnextbin sketch
@oroce
oroce / esnextbin.md
Last active November 22, 2016 08:16
esnextbin sketch
const MenuRenderer = React.createClass({
contextTypes: {
router: React.PropTypes.func.isRequired
}
componentWillReceiveProps(newProps, oldProps) {
const router = this.context.router;
console.log('new props', newProps, oldProps);
// decide based on newProps or router
}
@oroce
oroce / esnextbin.md
Last active April 30, 2016 20:50
esnextbin sketch
@oroce
oroce / readme.md
Created April 13, 2016 08:34
Wordpress setup script for scaleway VC1 server

Scaleway introduced VC1 (x64) servers but their images are built for arm :(

The setup.sh is basically commands copied from Dockerfile which is used to build the image: https://github.com/scaleway-community/scaleway-wordpress

Until they introduce image building possibilities this is your best shot:(

  1. Create a new server
  2. SSH and run the command above
  3. Shutdown the server
  4. Create a snapshot
@oroce
oroce / custom-model-with-view.js
Created June 24, 2012 17:52
backbone.js CustomModel with View
var customModel = new CustomModel();
var sampleView = new Backbone.View({
model: customModel
});
@oroce
oroce / esnextbin.md
Last active February 17, 2016 09:20
esnextbin sketch