Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
🛹

Łukasz Korecki lukaszkorecki

🌴
🛹
View GitHub Profile
View conceal.vim
" replace 'function' with λ
au BufNewFile,BufRead *.js syntax keyword javasScriptFunction function conceal cchar=λ
au BufNewFile,BufRead *.js hi! link javasScriptFunction Conceal
au BufNewFile,BufRead *.js setlocal conceallevel=2
View test.go
package main
import (
"time"
"fmt"
)
func main() {
fmt.Print("hello!")
View nope.rb
module Nope
def save
STDERR << "nope"
end
end
model.extend Nope
View t.rb
F = [
(B = 1 ),
(C = 2 )
]
puts "#{F.inspect} #{B.inspect} #{C.inspect}"
# output:
# [1, 2] 1 2
View bundler.txt
Fetching gem metadata from http://rubygems.org/........
Fetching additional metadata from http://rubygems.org/.......
Resolving dependencies...
Bundler could not find compatible versions for gem "faraday":
In Gemfile:
analytics-ruby (~> 0.5) ruby depends on
faraday (< 0.9, >= 0.7.4) ruby
analytics-ruby (~> 0.5) ruby depends on
faraday (0.9.0)
View vagrant-kvm-vbox.sh
#!/usr/bin/env bash
sudo apt-get install kvm libvirt-dev
vagrant plugin install vagrant-kvm
vagrant plugin install vagrant-mutate
vagrant mutate http://files.vagrantup.com/precise64.box
View gist:9192217
#######################################################
The bcrypt-ruby gem has changed its name to just bcrypt. Instead of
installing `bcrypt-ruby`, you should install `bcrypt`. Please update your
dependencies accordingly.
#######################################################
View bash_special_vars.md

$* - all params, starting from one, expanded to "$1$2"

$@ - all params, starting from, expanded to "$1" "$2"

$# - number of arguments

$$ - PID of shell

$0 - name of the shell or script

View vbox.md

If you get the following error:

Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` /vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` /vagrant /vagrant
View notify-urxvt.pl
#!/usr/bin/env perl
sub on_add_lines {
my ($self, $str) = @_;
# my ($match) = $str =~ /ukasz/ge
if ($str =~ /[\@]?Łukasz|Lukasz/) {
`notify-send -t 200 Mention '#{$str}'`
}
}