Skip to content

Instantly share code, notes, and snippets.

View simi's full-sized avatar
🇨🇿

Josef Šimánek simi

🇨🇿
View GitHub Profile
JCC = javac
JFLAGS = -g
JCP = -cp .:./boilerpipe-1.2.0.jar:./lib/xerces-2.9.1.jar:./lib/nekohtml-1.9.13.jar
JAVA = java
default: TestArticleExtractor.class
TestArticleExtractor.class: TestArticleExtractor.java
$(JCC) $(JFLAGS) $(JCP) TestArticleExtractor.java
@simi
simi / lide.js
Created September 2, 2014 21:06
// Android performance
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
if(isAndroid) {
document.write('<style>* { text-shadow: none !important; box-shadow: none !important; -moz-box-shadow: none !important; -webkit-box-shadow: none !important; }</style>');
}
@simi
simi / broccoli.txt
Created October 9, 2014 15:27
Broccoli windows errors
> broccoli@0.13.1 pretest e:\Soft\broccoli
> jshint lib test
> broccoli@0.13.1 test e:\Soft\broccoli
> tap --timeout 2 ./test/*_test.js
not ok ./test/builder_test.js ......................... 28/32
Command: "C:\Program Files (x86)\nodejs\node.exe builder_test.js"
TAP version 13
module Refinery
class Version
@major = 3
@minor = 0
@tiny = 0
@build = nil
class << self
attr_reader :major, :minor, :tiny, :build
@simi
simi / test.c
Created December 6, 2014 08:46
minimal ruby c eval
# compile with gcc test.c `pkg-config ruby --cflags --libs` -o test.out
#include <stdio.h>
#include <ruby.h>
int main(void) {
int result;
const char code[];
ruby_init();
ruby_init_loadpath();
@simi
simi / gist:c0cae5997a6b71549e2a
Created December 10, 2014 13:54
common git alias
[ryba@retro refinerycms (clean-locales-after-test)]❤ cat ~/bin/git-fakin-push
#!/bin/bash
git push --force $1
@simi
simi / result.txt
Created April 12, 2015 20:50
php make tests gist
===================================================================== [7/1861]
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
Test open_basedir configuration [tests/security/open_basedir_linkinfo.phpt] XFAIL REASON: BUG: open_basedir cannot delete symlink to prohibited file. See also
bugs 48111 and 52176.
Inconsistencies when accessing protected members [Zend/tests/access_modifiers_008.phpt] XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Inconsistencies when accessing protected members - 2 [Zend/tests/access_modifiers_009.phpt] XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770.phpt] XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend
diff --git a/object.c b/object.c
index 79358ad..425c10c 100644
--- a/object.c
+++ b/object.c
@@ -1980,11 +1980,13 @@ static VALUE
rb_mod_attr_reader(int argc, VALUE *argv, VALUE klass)
{
int i;
+ VALUE result = rb_ary_new2((long)argc);
@simi
simi / server.js
Created May 5, 2015 10:30
chember simple WS broadcaster
var WebSocketServer = require('ws').Server;
var socket = new WebSocketServer({port: 8080});
socket.on('connection', function(connection) {
connection.on('message', function(message) {
console.log(message);
socket.broadcast(message);
});
});
retro@retro-laptop:~/padri/test$ bundle install
Fetching source index from http://gemcutter.org
Resolving dependencies
Installing activesupport (2.3.5) from system gems
Installing bundler (0.9.5) from system gems
Installing daemons (1.0.10) from system gems
Installing eventmachine (0.12.10) from system gems
Installing fuzzyhash (0.0.11) from system gems
Installing haml (2.2.20) from system gems
Installing i18n (0.3.3) from system gems