Skip to content

Instantly share code, notes, and snippets.

View truetamtam's full-sized avatar

Роман Уляшев (Roman Ulashev) truetamtam

View GitHub Profile
@truetamtam
truetamtam / webgl_experiments
Last active August 29, 2015 14:21
webgl_experiments
<!DOCTYPE html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>html5 webgl test project</title>
<style type="text/css">
body {
position: absolute;
width: 100%;
height: 100%;
@truetamtam
truetamtam / hosts.conf
Last active August 29, 2015 14:24
[nginx + php-fpm] nginx config for webasyst shop-script6 installation.
server {
listen 80;
server_name wbs;
root /var/www/wbs;
@truetamtam
truetamtam / after.sh
Last active October 11, 2017 13:10
Laravel Homestead after.sh placed in ~/.homestead/after.sh
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
echo "Updating machine software"
locale-gen en_GB.UTF-8
# Updating composer
@truetamtam
truetamtam / rsa-encryption.md
Last active August 31, 2015 19:02 — forked from carlj/rsa-encryption.md
RSA large File En- and Decryption

#RSA File De- and Encryption Docu for encrypt and decrypt a large file with AES and RSA

##Keypairs

###Generate RSA Keypairs

//generates a private Key with 8196 Bit
openssl genrsa -out private.pem 8196
@truetamtam
truetamtam / multi_key_crypto.sh
Last active August 30, 2015 08:42 — forked from kennwhite/multi_key_crypto.sh
OpenSSL command line recipe for multi-public key file encryption. Any single private key paired to one of the public keys can decrypt the file.
#!/usr/bin/env bash
#
# Example of multiple key AES encryption for text files using the openssl v. 0.9.8+ command line utility
# Uses n public certs as key for MIME PKCS envelope, any individual private key can decrypt.
#
# If standard RSA ssh keys exist, these can be converted to public certs as well (and ssh keys can decrypt)
#
# To sign (and verify) the encrypted file, one of the private keys is required, see:
# http://www.openssl.org/docs/apps/smime.html#EXAMPLES for openssl smime examples
# or http://www.openssl.org/docs/apps/cms.html#EXAMPLES for cms utility (OpenSSL v. 1.0+)
@truetamtam
truetamtam / .bashrc
Last active October 16, 2015 11:12
My .bashrc
# truetamtam
# PS1 for debian set in /etc/bash.bashrc
# PS1='${debian_chroot:+($debian_chroot)}\[\e[1;32m\][\u@\h: \w]\$\[\e[0m\] '
# vim options set in /etc/vim/vimrc
alias vg='vagrant'
alias hs='homestead'
alias cm='composer'
alias dc='docker-compose'
alias d='docker'
alias dm='docker-machine'
@truetamtam
truetamtam / remount_www.conf
Last active September 29, 2015 14:02
Remount on windows7 with vbox. Tested on Ubuntu14.04. Solves permission problems for launched servers on guest machine. Place in /etc/init/*.conf
description "Remounting shared folder d:\www from windows7 with virtualbox.
Solving permission problems.
Origin: http://superuser.com/questions/527963/how-to-allow-nginx-in-guest-vm-access-shared-folders-in-host-os"
start on starting
task
exec mount -t vboxsf www -o rw,dmode=777,gid=1000,uid=1000 /home/user/shared_www
@truetamtam
truetamtam / tab2app.sh
Last active October 7, 2015 13:03
Switch to last window of the application. Search by name in title. Uses wmctrl & xprop. Origin: http://askubuntu.com/a/562191
#!/bin/bash
# Origin: http://askubuntu.com/a/562191
# required: wmctrl
app=$1
workspace=$(wmctrl -d | grep '\*' | cut -d ' ' -f1)
win_list=$(wmctrl -lx | grep $app | grep " $workspace " | awk '{print $1}')
IDs=$(xprop -root|grep "^_NET_CLIENT_LIST_STACKING" | tr "," " ")
@truetamtam
truetamtam / laravel-lumen-5-homestead-win.md
Created October 14, 2015 12:41 — forked from prograhammer/laravel-lumen-5-homestead-win.md
Laravel/Lumen 5.1 Homestead for Windows (includes fixes for shared-folder related slowness, npm install problems, caching, etc)

Laravel / Lumen Homestead for Windows w/fixes

###Initial installation and configuration Install Git for Windows which includes Git Bash.

Install VirtualBox and Vagrant.

Note: Do not install VirtualBox 5.0 and Vagrant 1.7.4. At the moment these versions are causing problems that I've been unable to solve with this Gist. Use the previous versions instead. VirtualBox 4.3.30 and Vagrant 1.7.3.

@truetamtam
truetamtam / homestead_problesm_solutions.txt
Last active October 15, 2015 21:38
Homestead problems and solutions(npm err windows7x64 shared folders)
----------------------------------------------------
Problem 1:
npm install
... npm ERR...
Soft:
Laravel Homestead version 2.1.6
Vagrant 1.7.4
VirtualBox 4.3.30
Solution:
1. ssh into homestead