Skip to content

Instantly share code, notes, and snippets.

View rainerborene's full-sized avatar

Rainer Borene rainerborene

View GitHub Profile
module KeyMapping
def self.included(base)
base.instance_variable_set(:@key_mappings, {})
base.extend(ClassMethods)
base.send(:include, InstanceMethods)
end
module ClassMethods
attr_reader :key_mappings
✓ Pulling nanobox/build:feature_release-2017-11 image
✓ Starting docker container
✓ Preparing environment for build
✓ Gathering requirements
✓ Mounting cache_dirs
! Installing binaries and runtimes
- Installing packages :
calculating dependencies... done.
nothing to upgrade.
Building runtime :
✓ Starting docker container
! Preparing environment for build
- Copying ssh keys into the build environment...
- Setting up directories and permissions...
- Cloning engine :
Cloning into 'engine'...
remote: Counting objects: 869, done.
remote: Total 869 (delta 0), reused 0 (delta 0), pack-reused 869
Receiving objects: 100% (869/869), 134.60 KiB | 48.00 KiB/s, done.
installing ImageMagick-7.0.5.1...
pkg_install warnings: 0, errors: 4
pkg_install error log can be found in /data/var/db/pkgin/pkg_install-err.log
reading local summary...
processing local summary...
marking nodejs-8.6.0 as non auto-removable
marking nginx-1.12.0 as non auto-removable
marking ImageMagick-7.0.5.1 as non auto-removable
" Executa o buffer atual.
:QuickRun
" Executa o buffer atual da linha 3 até 6.
:3,6QuickRun
" Executa o buffer atual como um programa perl.
:QuickRun perl
" Executa código de uma única linha no modo command-line.
@rainerborene
rainerborene / fzf.vim
Last active September 22, 2016 17:08
fzf mappings I use on my init.vim
nnoremap <silent> <Leader><Leader> :Files<CR>
nnoremap <silent> <Leader>b :Buffers<CR>
nnoremap <silent> <Leader>. :Tags<CR>
vnoremap <leader>a "zy:execute "Ag " . @z<cr>
nnoremap <leader>a :Ag<Space>
TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN
1.276129 4701 135 0.006099 0.000271 rubyConditionalExpression \%(\%(^\|\.\.\.\=\|[{:,;([<>~\*%&^|+=-]\|\%(\<[_[
0.781294 6021 1455 0.003978 0.000130 rubySymbol []})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\
0.463584 5689 1123 0.002217 0.000081 rubySymbol \%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!
0.159944 6262 1782 0.005996 0.000026 rubyOperator [~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\
0.095848 6307 1741 0.000193 0.000015 rubyOperator ->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\
0.078334 9755 5189 0.000152 0.000008 rubySymbol [[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-
0.071211 9390 5247 0.001712 0.000008 rubySymbol []})\"':]\@<!:\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-
0.066833 6308 1931 0.000280 0.000011 rubyConstant \%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]
0
package com.marakana.yamba.util
import android.content.SharedPreferences
fun SharedPreferences.Editor.put(key: String, value: Any) {
when (value) {
is String -> putString(key, value)
is Float -> putFloat(key, value)
is Int -> putInt(key, value)
is Boolean -> putBoolean(key, value)
2696 epoll_wait(4, {{EPOLLIN, {u32=1337827248, u64=94739726442416}}}, 3, -1) = 1
2696 clock_gettime(CLOCK_BOOTTIME, {1217, 21060015}) = 0
2696 socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
2696 sendmsg(8, {msg_name(21)={sa_family=AF_LOCAL, sun_path="/run/systemd/notify"}, msg_iov(1)=[{"WATCHDOG=1", 10}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 10
2696 close(8) = 0
2696 timerfd_settime(5, TFD_TIMER_ABSTIME, {it_interval={0, 0}, it_value={1258, 73195000}}, NULL) = 0
2696 recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"l\1\4\1\v\0\0\0\3\0\0\0\266\0\0\0\1\1o\0\31\0\0\0", 24}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 24
2696 recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"/org/freedesktop/machine1\0\0\0\0\0\0\0\3\1s\0\20\0\0\0OpenMachineLogin\0\0\0\0\0\0\0\0\2\1s\0 \0\0\0org.freedesktop.machine1.Manager\0\0\0\0\0\0\0\0\6\1s\0\30\0\0\0org.freedesktop.machine1\0\0\0\0\0\0\0\0\10\1g\0\1s\0\0\7\1s\0\5\0\0\0:1.70\0\0\0\6\0\0\0debia
@rainerborene
rainerborene / gist:6f976036853db9c28aad
Created September 7, 2015 16:57
systemd-machined strace log file
8861 epoll_wait(4, {{EPOLLIN, {u32=11, u64=11}}}, 3, -1) = 1
8861 clock_gettime(CLOCK_BOOTTIME, {177248, 657110423}) = 0
8861 read(5, "\1\0\0\0\0\0\0\0", 8) = 8
8861 socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
8861 sendmsg(8, {msg_name(21)={sa_family=AF_LOCAL, sun_path="/run/systemd/notify"}, msg_iov(1)=[{"WATCHDOG=1", 10}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 10
8861 close(8) = 0
8861 timerfd_settime(5, TFD_TIMER_ABSTIME, {it_interval={0, 0}, it_value={177288, 656179000}}, NULL) = 0
8861 epoll_wait(4, {{EPOLLIN, {u32=11, u64=11}}}, 3, -1) = 1
8861 clock_gettime(CLOCK_BOOTTIME, {177288, 656597823}) = 0
8861 read(5, "\1\0\0\0\0\0\0\0", 8) = 8