Skip to content

Instantly share code, notes, and snippets.

View purplesyringa's full-sized avatar
🥺

Alisa Sireneva purplesyringa

🥺
View GitHub Profile
@purplesyringa
purplesyringa / ME-MonokaiC.tmTheme
Created February 17, 2018 06:43
MarkdownEditing
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- MarkdownEditing
MonokaiC Theme
Antonio Vivace, June 2016
(monokai-blue-light "#89BDFF") -> SW 6961 BLUE BEYOND
(monokai-gray "#595959") -> SW 7048 URBANE BRONZE
(monokai-gray-darker "#383830") -> SW 6258 TRICORN BLACK
(monokai-gray-darkest "#141411") -> SW 6990 CAVIAR
@purplesyringa
purplesyringa / solution.cpp
Last active February 17, 2018 09:39
Suffix array
#include <iostream>
#include <cstdint>
#include <vector>
#include <string>
#include <fstream>
using namespace std;
int main() {
ifstream in("array.in");
@purplesyringa
purplesyringa / C.cpp
Created February 17, 2018 12:57
Solution
#include <iostream>
#include <cstdint>
#include <vector>
#include <string>
#include <fstream>
#include <set>
using namespace std;
int main() {
@purplesyringa
purplesyringa / sword.cpp
Last active February 21, 2018 21:18
Some code looking like sword
template
<class T>
struct
RMQ{
typedef
vector<
T>V;
typedef
size_t
H;vector
@purplesyringa
purplesyringa / compile.sh
Last active April 22, 2018 11:57
PDP11/BK0010 compiler script
#!/usr/bin/env bash
cd "$(dirname "$0")"
echo Compiling $1
./compiler "$1" >_log
if [ $? -ne 0 ]; then
cat _log | python -c "import sys; print sys.stdin.read().decode('utf-8', 'ignore').encode('utf-8')" | tail -2 | head -1
exit
@purplesyringa
purplesyringa / BK0010.sublime-build
Created April 22, 2018 12:24
Sublime Build System для БК0010 / PDP11ASM
{
"shell_cmd": "\"/Users/Ivanq/Documents/BK0010/compile.sh\" \"$file_path/$file_name\""
}

C++ и STL

Библиотеки

bits/stdc++.h

IO

ios_base::sync_with_stdio(0); - только если только cin/cout или только scanf/printf.

@purplesyringa
purplesyringa / bug.c++
Created June 16, 2018 13:38
clang bug?
//
// main.cpp
// Work in Moscow
//
// Created by Ivan Gorbunov on 21.07.17.
// Copyright © 2017 Ivan Gorbunov. All rights reserved.
//
#include <algorithm>
#include <iostream>
#include <cstdlib>
I, Ivanq, own gitcenteramorgan@zeroid.bit (address: 194pDo3F76iy7UnsyuXVdgtH3BVM1Ai1dg), registered on zn.amorgan.xyz proxy.
@purplesyringa
purplesyringa / pdp11asm.md
Last active October 22, 2019 08:49
Syntax highlighting for PDP11ASM

Откройте папку с пакетами Sublime опцией Browse packages.... Перейдите в папку User и скопируйте туда приведенные ниже файлы.

Затем откройте любой исходник на ассемблере (файл с расширением .ASM или .MAC), выберите в списке языков (справа снизу) PDP-11 Asm. Затем в Preferences -> Color Scheme... выберите pdp11asm.


Open the directory with Sublime packages by pressing Browse packages.... Then open User subdirectory and copy the files below there.

Then open any assembler source (.ASM or .MAC), choose PDP-11 Asm in the language list (bottom right). Then open Preferences -> Color Scheme... and choose pdp11asm.