Skip to content

Instantly share code, notes, and snippets.

View DarkHole1's full-sized avatar
👁️

Dark Hole DarkHole1

👁️
View GitHub Profile
@DarkHole1
DarkHole1 / json.js
Last active November 18, 2020 08:01 — forked from bubnenkoff/json.json
<script>
var data = [{
"fz": 44,
"registration_number": "0301300020720000004",
"organizer_inn": "0268019693",
"fas_complaints": "False",
"placing_way": "Электронный аукцион",
"lots": {
"lot_number": 1,
"lot_items": [{
@DarkHole1
DarkHole1 / README.md
Created January 14, 2019 13:10
SCRIPT-8
>./arr
>./arr
cases=:monad define
t=.u,:a.{~32+a.i.u=.a.{~(3 :'32-~^:((y<123)*.(y>96))y')"0 a.i.y
t&(4 :'y}x')"1 #:i.2^#u
)
import std.stdio;
import std.conv: parse;
import std.array: split, join;
import std.algorithm: map;
import std.string: chop;
import std.math: sqrt;
void main() {
readln;
readln.chop.split(" ").map!yesno.join("\n").writeln;
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('Hello, world!');
});
app.listen(8080);
#!/bin/bash
echo -en '\033[38;2;255;0;0m' && figlet -c -t RTFM && printf '%*s' $((($COLUMNS-23)/2)) && echo -e '\033[38;2;255;0;0mR\033[0mead \033[38;2;255;0;0mT\033[0mhe \033[38;2;255;0;0mF\033[0mucking \033[38;2;255;0;0mM\033[0manual'
@DarkHole1
DarkHole1 / main.d
Created May 18, 2018 16:56 — forked from run-dlang/main.d
Code shared from run.dlang.io.
import std.stdio;
import std.array: split, join;
import std.algorithm.iteration: map;
import std.conv: to;
void main()
{
string s = "635-34-7-3 751-16-2-1-1 224-16-4-1-1 625-11-3-1-1 231-16-4-2-1-1 212-7-3-2-1 603-19-5-2-2 624-27-6-3-1-1 663-28-1 600-27-3-2-1-1 102-12-4";
string alph = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz{}";
string res = s.split(' ').map!("a.split('-').map!(\"a.to!int\").fold!\"a + b * b\"(0)").map!((a) => [alph[a / 10000], alph[a % 10000 / 100], alph[a % 100]]).join("");
writeln(res);
@DarkHole1
DarkHole1 / main.d
Created May 18, 2018 16:32 — forked from run-dlang/main.d
Code shared from run.dlang.io.
import std.stdio;
void main()
{
string s = "dhctf{54nc7u5_c4n7_d3c1ph3r_7h15}";
string alph = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz{}";
string res;
auto n = 0;
for(auto i = 0; i < s.length; ++i) {
auto j = 0;
for(; j < alph.length; ++j) if(s[i] == alph[j]) break;