Skip to content

Instantly share code, notes, and snippets.

View Enelar's full-sized avatar
💭
https://www.linkedin.com/in/offenso

Kirill Berezin Enelar

💭
https://www.linkedin.com/in/offenso
View GitHub Profile
@Enelar
Enelar / .gitconfig
Last active October 2, 2015 15:54
My default git config
[user]
name = Kirill Berezin
email = [email protected]
[url "ssh://[email protected]"]
insteadOf = https://github.com
[url "ssh://[email protected]"]
insteadOf = https://gitlab.com
[core]
editor = nano
[push]
@Enelar
Enelar / app.yaml
Created October 18, 2015 19:08 — forked from darktable/app.yaml
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
@Enelar
Enelar / photoshop.php
Last active January 30, 2016 02:30
Cut photoshop 100-200 MB psd files into 50KB jpeg.
<meta http-equiv="refresh" content="5"/>
<?php
include('phpa2o.php');
include('phpsql/oneline.php');
phpsql\OneLineConfig("pgsql://postgres@localhost/plov");
$trans = db::Begin();
@Enelar
Enelar / sublime.conf.json
Last active March 29, 2016 14:09
My sublime text default settings
{
"auto_match_enabled": false,
"draw_minimap_border": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 14,
"gutter": true,
"highlight_line": true,
"hot_exit": true,
"ignored_packages":
@Enelar
Enelar / sysctl.conf
Created April 4, 2016 16:04
sysctl.conf
vm.swappiness=90
vm.dirty_ratio=50
vm.dirty_background_ratio=30
vm.dirty_writeback_centisecs=60000
vm.vfs_cache_pressure=150
vm.laptop_mode=1
vm.page-cluster=1
vm.min_free_kbytes=2048
vm.memory_failure_recovery=1
vm.panic_on_oom=1
@Enelar
Enelar / xlsx_to_csv.sh
Created July 25, 2016 16:02
Convert xlsx/xls to csv in directory recursive
find . -type f -iname "*.xlsx" -print0 | while IFS= read -r -d $'\0' line; do
echo "$line"
ssconvert -S "$line" "${line%.xlsx}.%s.csv"
# rm "$line"
done
@Enelar
Enelar / java.sh
Created August 15, 2016 12:11
Best java options for vps
-XX:+UseParallelGC -Xms10m -Xmx1536m -XX:NewRatio=2
@Enelar
Enelar / compile-php-thread-safe-and-pthreads.sh
Created September 12, 2016 14:22 — forked from Divi/compile-php-thread-safe-and-pthreads.sh
Compile PHP Thread Safe & pthreads extension
#!/usr/bin/env bash
# PARAMETERS
# ----------
# PHP
# ---
PHP_TIMEZONE="UTC"
PHP_DIRECTORY="/etc/php5ts"
@Enelar
Enelar / preprocessor.foreach.cpp
Created October 6, 2016 23:31
Preprocessor foreach
#define EMPTY()
#define DEFER(func) func EMPTY()
#define EVAL(...) EVAL1(EVAL1(EVAL1(__VA_ARGS__)))
#define EVAL1(...) EVAL2(EVAL2(EVAL2(__VA_ARGS__)))
#define EVAL2(...) EVAL3(EVAL3(EVAL3(__VA_ARGS__)))
#define EVAL3(...) EVAL4(EVAL4(EVAL4(__VA_ARGS__)))
#define EVAL4(...) EVAL5(EVAL5(EVAL5(__VA_ARGS__)))
#define EVAL5(...) __VA_ARGS__
@Enelar
Enelar / hp.proliant.g3.txt
Created October 29, 2016 16:40
ILO 1.71 connect from OpenSSH 6.2
alias ilossh='ssh -o PasswordAuthentication=yes \
-o ChallengeResponseAuthentication=no \
-o GSSAPIAuthentication=no \
-o HostbasedAuthentication=no \
-o PubkeyAuthentication=no \
-o RSAAuthentication=no \
-o Compression=no \
-o ForwardAgent=no \
-o ForwardX11=no \
-o KexAlgorithms=diffie-hellman-group1-sha1 \