This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# super-tab | |
Mod4 Tab :NextWindow {groups} (workspace=[current]) | |
Mod4 Shift Tab :PrevWindow {groups} (workspace=[current]) | |
### TILING WINDOWS ### | |
#1920 / 2 = 960 | |
#1080 / 2 = 540 | |
Control KP_0 :Minimize | |
Control KP_1 :MacroCmd {ResizeTo 958 540} {MoveTo 00 00 LowerLeft} | |
Control KP_2 :MacroCmd {ResizeTo 1920 540} {MoveTo 00 00 LowerLeft} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net" | |
"bufio" | |
"net/http" | |
"net/http/httputil" | |
"io" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class YoloController < ApplicationController | |
include ::AsyncResponse | |
def index | |
async do | |
sleep 2 | |
@yolo = "I AM ASYNC" | |
resume_render |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////// | |
// Test Runner Code | |
////////////////////////////////// | |
#include <stdio.h> | |
typedef int (test_fn_t)(void); | |
struct test_t { | |
char * name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark.measure { 10_000.times { ActionSubscriber::Publisher.publish("test", "test", "test") } } | |
5.590000 2.110000 7.700000 ( 14.262266) | |
Benchmark.measure { 10_000.times { ActionSubscriber::Publisher.publish_async("test", "test", "test") } } | |
0.030000 0.000000 0.030000 ( 0.025184) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; ujelly-theme-autoloads.el --- automatically extracted autoloads | |
;; | |
;;; Code: | |
;;;### (autoloads nil "ujelly-theme" "ujelly-theme.el" (21808 38161 | |
;;;;;; 0 0)) | |
;;; Generated autoloads from ujelly-theme.el |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AnyPage | |
attr_reader :sql | |
def initialize(sql, options = {}) | |
@page_size = options.fetch(:page_size) { 1000 } | |
@sql = sql | |
@total_pages = nil | |
end | |
def self.page(sql, nth, options = {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "socket" | |
# Detect if a socket is in CLOSE_WAIT | |
def socket_in_close_wait?(socket) | |
# Will return empty string on EOF (closed socket) | |
socket.recv_nonblock(1, ::Socket::MSG_PEEK) == "" | |
rescue IO::WaitReadable | |
false | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Rpc do | |
defmodule ServiceDirectory do | |
defmodule Instance do | |
defstruct address: nil, port: nil, expires_at: nil, uuid: nil | |
end | |
## | |
# USAGE: | |
# | |
# Rpc.ServiceDirectory.start_link(port: 53023) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Queryable { | |
fn pluralized_table_name(&self) -> String; | |
fn predicates(&self) -> &Vec<String>; | |
fn has_limit(&self) -> bool { | |
return self.limit_value() >= 0; | |
} | |
fn limit_value(&self) -> i64; |