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
# generate modeline with command "cvt 1680 1050" (or the resolution you're looking for) | |
Section "Device" | |
Identifier "Configured Video Device" | |
# Option "ModeValidation" "NoEdidModes" | |
# Option "UseEdid" "false" | |
EndSection | |
Section "Monitor" | |
Identifier "Configured Monitor" |
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
xrandr --newmode 1680x1050 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync | |
xrandr --addmode DVI-I-1 1680x1050 | |
xrandr --output DVI-I-1 --mode 1680x1050 |
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 com.izaron.codeforces.json; | |
import java.io.*; | |
import java.net.*; | |
import java.util.*; | |
import org.json.*; | |
import sun.misc.Sort; |
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
// ==UserScript== | |
// @name AntiMaximan | |
// @namespace http://codeforces.com/blog/entry/* | |
// @include http://codeforces.com/blog/entry/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
$(".avatar:contains('MAXIMAN')").parent().parent().hide(); |
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
String generateHtml(String codeTheme, String lineNumbersProperty, String font, String sourceCode) { | |
if (!lineNumbersProperty.isEmpty()) { | |
return "<link rel=\"stylesheet\" href=\"styles-hl/" + codeTheme + ".css\">\n" + | |
"<script src=\"highlight.pack.js\"></script>\n" + | |
"<script src=\"highlightjs-line-numbers.js\"></script>\n" + | |
"<script>hljs.initHighlightingOnLoad();</script>\n" + | |
"<script>hljs.initLineNumbersOnLoad();</script>\n" + | |
"<link rel=\"stylesheet\" href=\"lines.css\">\n" + | |
"<style type=\"text/css\">.hljs {\n" + | |
" font-family: \"" + font + "\";\n" + |
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
@font-face { | |
font-family: "Andale Mono"; | |
src: url("fonts/andale-mono.ttf") | |
} | |
@font-face { | |
font-family: "Courier New"; | |
src: url("fonts/courier-new.ttf") | |
} |
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
fun main(args: Array<String>) { | |
val pairs = (1..readLine()!!.toInt()).map { | |
val (a, b) = readLine()!!.split(' ').map(String::toInt) | |
Pair<Int, Int>(Math.min(a, b), Math.max(b, a)) | |
} | |
print(when { | |
pairs.all { it.first % 3 == 0 && it.second % 3 == 0 } -> 0 // Has no answers | |
else -> { | |
val sum = pairs.sumBy { it.first } | |
when { |
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
from pysubs2 import * | |
import sys | |
def main(argv=sys.argv): | |
if len(argv) <= 2: | |
print("Usage: python subtitle-glue.py output-file input-files") | |
return | |
subs = SSAFile() |
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 os | |
import sys | |
import subprocess | |
from termcolor import colored | |
def make(): | |
print("Building... ", end='') | |
res = subprocess.Popen('cmake /home/izaron/GCI-Fork1/ccextractor/src && make', shell=True, stdout=subprocess.PIPE) | |
output = res.communicate()[0] | |
print(colored("Builded", 'green')) |
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
Install vagrant - choose your version https://www.vagrantup.com/downloads.html | |
For ubuntu you must download .deb file and simply launch it | |
Install VirtualBox 5.0 (Newer versions are not supported yet) - https://www.virtualbox.org/wiki/Download_Old_Builds | |
Choose file for your system. Version VirtualBox 5.0.30 at the top will be OK | |
Then download CCExtractor and launch vagrant: | |
$ git clone git@github.com:CCExtractor/ccextractor.git # clone repository | |
$ cd ccextractor |
OlderNewer