Skip to content

Instantly share code, notes, and snippets.

View cema-sp's full-sized avatar
🗺️
Living life

Semyon Pisarev cema-sp

🗺️
Living life
View GitHub Profile
@cema-sp
cema-sp / curls.sh
Created January 30, 2019 22:31
XDA-Stack-WP-Connect
curl --request POST \
--url 'https://www.xda-developers.com/index.php?sc-api-route=posts&sc-api-version=1' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-hash: dc3fee898d45a56c7198f3f0321ebe404981a8603384e1cb4731dc8549961046' \
--data '{
"post_date_gmt": "2019-02-20T08:00:00.000Z",
"post_name": "Test Headline",
"post_title": "Test Headline",
"post_type": "post",
@cema-sp
cema-sp / cli.go
Created July 26, 2017 20:37
Part of TCR driver utility
package cli
import (
"bufio"
"encoding/json"
"fmt"
"os"
"quantum/hart/tcr/hart"
"quantum/hart/tcr/messages"
"strings"
@cema-sp
cema-sp / server.js
Created July 26, 2017 20:33
Part of Server Side Rendering App
/**
* @flow
*/
import path from 'path';
import chalk from 'chalk';
import fs from 'fs';
import serialize from 'serialize-javascript'; // XSS-safe JSON.stringify()
import Express from 'express';
# Copy file path and column in vim (+) format
echo \1 +\2 | tr -d '\n' | pbcopy
@cema-sp
cema-sp / 1toN.rb
Last active February 11, 2017 18:00
Print Integers 1 to N without loops and conditions
#!/usr/bin/env ruby
def upto_n(n)
e = Enumerator.new do |y|
f = -> (x) { yield x; y << x; f[x + 1] }
f[1]
end
e.take(n)
end

Keybase proof

I hereby claim:

  • I am cema-sp on github.
  • I am cema_sp (https://keybase.io/cema_sp) on keybase.
  • I have a public key ASC5aJu6kCsHfG1j38CJrUZFdqKH05FjZUfoKBzkQV6WWAo

To claim this, I am signing this object:

@cema-sp
cema-sp / sysconfig.log
Created January 18, 2017 12:48
python3 -m sysconfig
Platform: "macosx-10.12-x86_64"
Python version: "3.6"
Current installation scheme: "posix_prefix"
Paths:
data = "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6"
include = "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/include/python3.6m"
platinclude = "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/include/python3.6m"
platlib = "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages"
platstdlib = "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6"
@cema-sp
cema-sp / error.log
Created January 18, 2017 11:19
Kitty installation error on MacOS
gcc -Wall -O3 -shared /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-charsets.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-colors.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-core_text.m.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-cursor.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-data-types.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-glfw.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-history.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-line-buf.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-line.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-parser.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-screen.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-sprites.c.o /private/tmp/kitty-20170118-21416-1dewhqc/build/fast_data_types-tracker.c.o /private/tmp/kitt
require 'irb'
IRB.setup nil
IRB.conf[:MAIN_CONTEXT] = IRB::Irb.new.context
require 'irb/ext/multi-irb'
# ARGV.clear
IRB.irb nil, self
@cema-sp
cema-sp / # rust - 2017-01-09_18-36-09.txt
Created January 9, 2017 15:40
rust on macOS 10.12.2 - Homebrew build logs
Homebrew build logs for rust on macOS 10.12.2
Build date: 2017-01-09 18:36:09