Skip to content

Instantly share code, notes, and snippets.

View ephrin's full-sized avatar

Volodymyr Myrza ephrin

  • Vinnytsia/Ukraine
View GitHub Profile
@ephrin
ephrin / gist:8028477
Last active December 31, 2015 18:39
ruby env
## ~username (not root)
\curl -sSL https://get.rvm.io | bash -s stable --ruby
@ephrin
ephrin / gist:8113510
Created December 24, 2013 13:39
shell real ip address
/sbin/ifconfig | grep 'inet\(:\| \)' | grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
@ephrin
ephrin / gist:8417274
Created January 14, 2014 12:03
ssh username/connection alias
Create a file named ~/.ssh/config and put this in there:
Host h
User christopher
HostName my.domain.top
Now you only have to type ssh h and it does the same thing!
You can also use a wildcard:
Host *
@ephrin
ephrin / TokenConfiguration.php
Created March 27, 2014 10:38
Генерация токенов при помощи конфигуратора.
<?php
/**
* Достаем сущность пользователя.
* @var $entity UserInterface|DocumentInterface
*/
$entity = $this->getDI()->get(\Services::dm)->getRepository(Partner::class)->findOneBy(
['username' => 'assolua291']
);
/**
@ephrin
ephrin / configure.md
Last active August 29, 2015 14:06
php compile options

Compiling PHP5

Client version

#! /bin/sh
# mkphp5-cli
# Build a command line version of PHP5
./configure \
--prefix=/usr/share/php5 \
--datadir=/usr/share/php5 \
@ephrin
ephrin / nmap-lists.sh
Created October 29, 2014 07:00
Nmap usefull
nmap --system-dns #shows names
@ephrin
ephrin / gist:b1688ac81a2cec512a9d
Created November 3, 2014 08:21
lenovo brightness modules
http://forum.notebookreview.com/ideapad-essential/716609-tutorial-lenovo-y500-ubuntu-linux-brightness-key-fix.html
@ephrin
ephrin / chng.sh
Created November 4, 2014 11:17
docker dns
$ sudo nano /etc/default/docker
---
# Add:
DOCKER_OPTS="--dns 8.8.8.8"
# 8.8.8.8 could be replaced with a local DNS server, such as 192.168.1.1
# multiple DNS servers can be specified: --dns 8.8.8.8 --dns 192.168.1.1
@ephrin
ephrin / youtrack-6.0.12124.trace.txt
Created November 6, 2014 06:48
Youtrack 6 redirect to Internal Server Error trace
10:45:40,721 DEBUG [ntralAuthenticationServiceImpl] Removing ticket [TGT-1-QGsMLVRwYX5OYAdaSCcC440xXpJhlo0xJuYpVUQLPfRWR3gSwT-jetpass] from registry.
10:45:40,722 DEBUG [ntralAuthenticationServiceImpl] Ticket found. Expiring and then deleting.
10:45:40,814 INFO [AuthenticationManagerImpl ] Principal found: 01a664c9-530b-4aee-9e38-bfe1cb3dd217
10:45:40,815 DEBUG [AuthenticationManagerImpl ] Attribute map for 01a664c9-530b-4aee-9e38-bfe1cb3dd217: [VISIBLE_NAME=???????? ?????]
10:45:40,978 INFO [ntralAuthenticationServiceImpl] Granted service ticket [ST-2-0oauWnJVmyhkYK2URJTN-jetpass] for service [http://youtrack.riamm.vn.ua/hub/api/rest/oauth2/auth?client_id=6b6adb20-e08b-41c1-bbc9-008720a2198a&redirect_uri=http%3A%2F%2Fyoutrack.riamm.vn.ua%2Fdashboard&response_type=token&scope=6b6adb20-e08b-41c1-bbc9-008720a2198a+0-0-0-0-0&state=d89b5660-16b2-4726-807a-86ee19fe242a] for user [01a664c9-530b-4aee-9e38-bfe1cb3dd217]
10:45:41,025 WARN [BaseExceptionMapper ] [qtp56226968-63 ] [] REST exception
@ephrin
ephrin / load.sh
Created November 6, 2014 09:18
CPU load
dd if=/dev/zero of=/dev/null
fulload() {
dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null &
};
fulload;
read;
killall dd