Skip to content

Instantly share code, notes, and snippets.

@ob-ivan
ob-ivan / srt-resize.html
Created August 23, 2015 21:06
Resize srt
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<textarea id="input"></textarea>
<label>Offset (ms): <input id="offset"/></label>
<label>Factor: <input id="factor"/></label>
<button id="resize">resize</button>
<textarea id="output"></textarea>
@ob-ivan
ob-ivan / .gitattributes
Last active September 5, 2015 11:29
unequal
* text eol=lf
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<script type="text/javascript" src="oxcow.js"></script>
<script>
var game = new Game();
game.init();
<?php
error_log(__METHOD__ . ':' . __LINE__); // debug
error_log(__METHOD__ . ':' . __LINE__ . ': message'); // debug
error_log(__METHOD__ . ':' . __LINE__ . ': gettype($value) = ' . gettype($value)); // debug
error_log(__METHOD__ . ':' . __LINE__ . ': get_class($object) = ' . get_class($object)); // debug
@ob-ivan
ob-ivan / .gitignore
Last active February 29, 2016 20:49
ElfQuest comics downloader
/data/
#!/bin/bash
# USAGE:
# - clone to ~/GitHub/screensaver-layout
# - edit ~/.config/lxsession/LXDE/autoload
# - add line: @~/GitHub/screensaver-layout/screensaver-layout.sh
# - save and exit
# - relogin to desktop environment
SYS_LAYOUTS=$(setxkbmap -query | grep 'layout' | awk '{ print $2 }')
#!/bin/bash
# Your wallpapers folder
picturesPath=/home/ivan/Wallpapers
# needed to be run from cron
export DISPLAY=:0
# change `username` with your user name
export XAUTHORITY=/home/ivan/.Xauthority
#
# prompt command for xshell
#
# USAGE:
#
# $ mkdir ~/github
# $ cd ~/github
# $ git clone git@gist.github.com:3c8f9f74aa0de586f977599e625fced7.git prompt_command
#
# Then add these lines to your .bashrc:
@ob-ivan
ob-ivan / .bashrc
Last active August 8, 2019 12:32
Do not disable umask
#
# my basic bashrc file
#
# USAGE:
#
# $ mkdir ~/github
# $ cd ~/github
# $ git clone git@gist.github.com:cf6f78eccaabf463fecbc9177dcb1f7d.git bashrc
#
# Then add these lines to your .bashrc:
#!/usr/bin/php
<?php
interface IFilter {
public function bAccept($sSequence);
}
class CFilterRegExp implements IFilter {
private $sRegExp;
public function __construct($sRegExp)