Skip to content

Instantly share code, notes, and snippets.

View rainerborene's full-sized avatar

Rainer Borene rainerborene

View GitHub Profile
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
Compiling config v0.0.0 (file:///home/teste/.wtftw)
src/config.rs:53:80: 53:81 error: mismatched types:
expected `&wtftw::window_system::WindowSystem`,
found `alloc::rc::Rc<wtftw::window_system::WindowSystem>`
(expected &-ptr,
found struct `alloc::rc::Rc`) [E0308]
src/config.rs:53 add_key_handler_str!(config, w, "j", modm, |m, w, c| m.windows(w, c, |x| x.focus_down()));
^
note: in expansion of closure expansion
src/config.rs:53:60: 53:105 note: expansion site
impl EncryptionKey {
fn pbkdf2(&self, password: &str) -> (&[u8], &[u8]) {
let mut dk = [0u8; 32];
let mut mac = Hmac::new(Sha1::new(), password.as_bytes());
pbkdf2(&mut mac, self.encrypted_key.value.as_ref(), self.iterations, &mut dk);
return (&dk[0..16], &dk[16..])
}
}
$ curl "https://user:passwd@api.del.icio.us/v1/posts/all?results=2000" -o delicious.xml
-- Test for :execute, :while and :if
local helpers = require('test.functional.helpers')
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect
describe('test26', function()
setup(clear)
it('is working', function()
let regs='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/-"' | let i=0 | while (i<strlen(regs)) | exec 'let @'.regs[i].'=""' | let i=i+1 | endwhile | unlet regs
func BatchGeocode(ips []string) []*GeoIP {
ch := make(chan *GeoIP, len(ips))
responses := []*GeoIP{}
for _, ip := range ips {
go func(ip string) {
geo, err := Geocode(ip)
if err != nil {
log.Fatal(err)
}