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
package main | |
import ( | |
"bytes" | |
"strconv" | |
) | |
//// | |
// Query Builder | |
// |
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
val cipher = Map('a' -> 'а', 'b' -> 'б', 'c' -> 'ц', 'd' -> 'д', 'e' -> 'е', 'f' -> 'ф', 'g' -> 'г', | |
'h' -> 'ч', 'i' -> 'и', 'j' -> 'й', 'k' -> 'к', 'l' -> 'л', 'm' -> 'м', 'n' -> 'н', | |
'o' -> 'о', 'p' -> 'п', 'q' -> 'я', 'r' -> 'р', 's' -> 'с', 't' -> 'т', 'u' -> 'у', | |
'v' -> 'в', 'w' -> 'ш', 'x' -> 'х', 'y' -> 'ы', 'z' -> 'з', ' ' -> '@') | |
lazy val reverse_cipher = cipher.map(_.swap) | |
def encrypt(word: String) = | |
word.flatMap(x => cipher(x.toLower).toString) | |
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
(defn power-of [x n] | |
(loop [i 0, acc 1] | |
(if (not (< i n)) | |
acc | |
(recur (inc i) (* acc x))))) | |
(def thousand (range 1 1001)) | |
(def big-thousand (map #(power-of (bigint %1) 5) hundred)) | |
(print (reduce * big-thousand)) |
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 servertester.modules; | |
import java.io.*; | |
import java.net.HttpURLConnection; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: film42 |
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
public class Counter { | |
private int[] seq = null; | |
public Counter(int size) { | |
this.seq = new int[size]; | |
} | |
public Counter() { | |
this.seq = new int[10]; |