Skip to content

Instantly share code, notes, and snippets.

View np422's full-sized avatar

Niklas Paulsson np422

View GitHub Profile
<?php
echo ( TRUE ? "a" : TRUE ? "b" : "c" ) . "\n";
?>
# encoding: UTF-8
IRB.conf[:USE_READLINE] = true
IRB.conf[:SAVE_HISTORY] = 200
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history"
xtest=# set lc_numeric='en_US.UTF-8';
SET
xtest=# select to_char(2.34,'999D99');
to_char
---------
2.34
(1 row)
xtest=# set lc_numeric='sv_SE.UTF-8';
SET
select
c.relhasrules,
c.relkind,
c.relhasoids,
c.relname,
u.nspname
from
pg_catalog.pg_namespace u,
pg_catalog.pg_class c
where
root@niklas-ThinkPad:/mnt# aptitude moo
There are no Easter Eggs in this program.
root@niklas-ThinkPad:/mnt# aptitude -v moo
There really are no Easter Eggs in this program.
root@niklas-ThinkPad:/mnt# aptitude -v -v moo
Didn't I already tell you that there are no Easter Eggs in this program?
root@niklas-ThinkPad:/mnt# aptitude -v -v -v moo
Stop it!
root@niklas-ThinkPad:/mnt# aptitude -v -v -v -v moo
Okay, okay, if I give you an Easter Egg, will you go away?
<?php
//Konstanter tills vidare, senare från params ....
define('REPORT_URI' , '/reports/samples/AllAccounts');
define('JASPER_SERVER_URL' , 'http://localhost:8080/jasperserver/');
define('JASPER_USER' , 'test');
define('JASPER_PASSWORD' , 'test');
git diff ccb9ebe0ed59f41a59da84b7c74962886f6cceef..be3d311a71a91dc4142472b3d35e4ee52740f009 -- jquery.tokeninput-v2.js
diff --git a/public/javascripts/autocomplete/jquery.tokeninput-v2.js b/public/javascripts/autocomplete/jquery.tokeninput-v2.js
index fc0a765..85a9aa6 100644
--- a/public/javascripts/autocomplete/jquery.tokeninput-v2.js
+++ b/public/javascripts/autocomplete/jquery.tokeninput-v2.js
@@ -795,9 +795,6 @@
populate_dropdown(query, settings.jsonContainer ? results[settings.jsonContainer] : results);
}
- var queryStringDelimiter = settings.url.indexOf("?") < 0 ? "?" : "&";
ruby-1.9.2-p0 > require "dalli"
=> true
ruby-1.9.2-p0 > require "memcache"
=> true
ruby-1.9.2-p0 > m = MemCache.new(['192.168.31.206:11212:10', '192.168.31.207:11212:10'] )
=> <MemCache: 2 servers, ns: nil, ro: false>
ruby-1.9.2-p0 > m.get "apa"
=> "bepa"
ruby-1.9.2-p0 > m.set "foo" , "bar"
=> "STORED\r\n"
class String
def _dump level
#Strings are sometimes frozen, dup-i-dup before we can encode
begin
self.dup.encode Encoding::ASCII_8BIT
rescue
self.dup.force_encoding Encoding::ASCII_8BIT
end
end
def reencode_session(data)
if data.is_a? Hash
result = {}
data.map do |key,val|
if val.is_a?(Hash) || val.is_a?(Array)
result[key] = reencode_session(val)
else
result[key] = ensure_utf8(val)
end
end