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
find "." -name "${1:-"*.jar"}" -type "f" -print0 | \ | |
shuf -z | \ | |
awk -v limit="${2:-"50"}" 'BEGIN { RS = "\0" } ; NR <= limit { printf("%s%s", $0, "\0") }' | \ | |
xargs -I {} -0 realpath -z "{}" | \ | |
awk ' | |
BEGIN { RS = "\0" ; printf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<playlist version=\"1\" xmlns=\"http://xspf.org/ns/0/\">\n\t<trackList>\n") } ; { printf("\t\t<track>%s</track>\n", $0) } ; END { printf("\t</trackList>\n</playlist>\n") }' | \ | |
vlc - |
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
import java.util.List; | |
import java.util.Arrays; | |
import java.util.Random; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.TimeUnit; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import rx.Observable; | |
import rx.schedulers.Schedulers; |
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
CREATE TABLE | |
t_intervals ( | |
begin_time DATE, | |
end_time DATE, | |
category VARCHAR2(5), | |
code VARCHAR2(5), | |
value NUMBER | |
); | |
INSERT INTO t_intervals(begin_time, end_time, category, code, value) VALUES (to_date('08:00', 'HH24:MI'), to_date('08:30', 'HH24:MI'), 'A', '#1', 7); |
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
CREATE TABLE | |
t_texts ( | |
text VARCHAR2(10) | |
); | |
DECLARE | |
v_cursor NUMBER; | |
v_sql VARCHAR2(32767) := 'INSERT INTO $$TABLE$$(text) VALUES (:text)'; | |
v_table VARCHAR2(30) := 'T_TEXTS'; | |
v_value VARCHAR2(10) := 'Hello! '; |
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
CREATE TABLE | |
t_folders ( | |
id INTEGER, | |
parent_id INTEGER, | |
name VARCHAR2(100) | |
); | |
CREATE TABLE | |
t_files ( | |
id INTEGER, |
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
-- 1. T_INTERVALS: | |
-- [-----------------------------[ #1 | |
-- 08:00 08:30 | |
-- [---------[ #2 | |
-- 08:10 08:20 | |
-- [-------------------[ #3 | |
-- 08:40 09:00 | |
-- [----------[ #4 | |
-- 08:35 08:45 | |
-- [---------[ #5 |
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
-- T_INTERVALS: | |
-- [-----------------------------[ #1 O | |
-- 08:00 08:30 | |
-- [---------[ #2 X | |
-- 08:10 08:20 | |
-- [-------------------[ #3 O | |
-- 08:40 09:00 | |
-- [----------[ #4 X | |
-- 08:35 08:45 | |
-- [---------[ #5 O |
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
#!/bin/sh | |
# Ignore some files by extension | |
ack --ignore-file="ext:${extension_1},${extension_2}" "${rexgep}" |
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
DECLARE | |
FUNCTION | |
round_to_multiple( | |
in_number IN NUMBER, | |
in_multiple IN NUMBER | |
) | |
RETURN | |
NUMBER | |
IS | |
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
def expects(*types): | |
def f(decored_function): | |
def g(*args, **kwargs): | |
if not all(map(lambda z: z[0] == z[1], zip(map(lambda arg: type(arg), args), types))): | |
raise TypeError() | |
return decored_function(*args, **kwargs) | |
return g | |
return f | |
@expects(int, int) |
OlderNewer