Skip to content

Instantly share code, notes, and snippets.

View ku1ik's full-sized avatar
👋

Marcin Kulik ku1ik

👋
View GitHub Profile
arcins-Mac:stderred kill$ make
rm -rf build lib lib64
mkdir build && cd build && cmake ../src && make
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
@ku1ik
ku1ik / nginx.conf
Created April 25, 2012 19:24 — forked from lucasmazza/conf.md
Nginx upstart script that WORKS with Passenger.
description "nginx http daemon"
start on runlevel [2]
stop on runlevel [016]
console owner
exec /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf -g "daemon off;"
respawn
~ % source tmuxinator_completion
/home/kill/.rvm/gems/ruby-1.9.3-p125@global/bin/tmuxinator_completion:9: command not found: require
/home/kill/.rvm/gems/ruby-1.9.3-p125@global/bin/tmuxinator_completion:11: command not found: version
/home/kill/.rvm/gems/ruby-1.9.3-p125@global/bin/tmuxinator_completion:16: parse error near `end'
~ % which tmuxinator_completion
/home/kill/.rvm/gems/ruby-1.9.3-p125@global/bin/tmuxinator_completion
~ % cat =tmuxinator_completion
#!/home/kill/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
#
# This file was generated by RubyGems.
GistID: 2305990
foobar
baz
me | first message
| second message
| third message
someone | yeah, I agree
| but...
me | there is no "but"
| you know..
{
"result": [
{
"displayName": "First world Problems II",
"generatorID": 340895,
"imageUrl": "/cache/images/400x/1/2007/2055789.jpg",
"instancesCount": 78942,
"ranking": 20,
"totalVotesScore": 0,
"urlName": "First-World-Problems-Ii"
@ku1ik
ku1ik / line_break1.rb
Created March 8, 2012 10:44
Line breaking in Ruby
# Example 1
# Lets assume following line is longer than 80 cols and I want it to break it
Foobar.some_method.another_on(:with_some => :arg, :and_another => "one")
# Variant 1
Foobar.some_method.another_on(
:with_some => :arg, :and_another => "one"
)
class AsciiIo.Views.CommentsIndex extends AsciiIo.Views.Base
el: '#comments'
events:
'submit #new-comment': 'createComment'
initialize: ->
@collection.on('reset', @addAll, this)
@collection.on('add', @addOne, this)
irb(main):007:0> puts "z\xa0z"
z z
=> nil
ruby-1.9.2-p290 :005 > a = 'foo'; time(10000000) { "jola #{a} misio" }
user system total real
8.260000 0.010000 8.270000 ( 8.273313)
=> "jola foo misio"
ruby-1.9.2-p290 :006 > a = 'foo'; time(10000000) { "jola : misio".gsub(':', a) }
user system total real
48.940000 0.070000 49.010000 ( 49.054449)
=> "jola foo misio"