Skip to content

Instantly share code, notes, and snippets.

View adastreamer's full-sized avatar
🤺
What's happening?

Eugene Khashin adastreamer

🤺
What's happening?
View GitHub Profile
@adastreamer
adastreamer / resource.js
Created November 26, 2015 23:02 — forked from vladikoff/resource.js
Angular $resource and transformResponse
angular.module('itemServices', ['ngResource'])
.factory('Item', ['$resource',
function ($resource) {
return $resource('items/:id',
{id: '@id'},
{
query: {
isArray: true,
method: 'GET',
params: {},
sudo -u postgres psql
CREATE DATABASE test_database;
CREATE USER test_user WITH password 'qwerty';
ALTER USER myuser WITH SUPERUSER;
curl -H "Content-Type: application/json" -H "X-AN-APP-NAME: taxi_comfort_develop" -H "X-AN-APP-KEY: f2249fa774fed539e59d73b7e9c41e53" -X POST -d '{"device": "ios","token":"2f2c003c134fa79bc36e361f5e389afd0184ea14699cd8ba1760bc912af48308","alert":"Автомобиль подъехал!","sound":"Submarine.aiff","badge":1}' http://176.112.194.181:8801/api/v2/push
curl -H "Content-Type: application/json" -H "X-AN-APP-NAME: taxi_comfort_develop" -H "X-AN-APP-KEY: f2249fa774fed539e59d73b7e9c41e53" -X POST -d '{"device": "android","token":"APA91bEXSYuG6K_ilSzDIz-u2R1Si4oeM5oUrmNWgExefcEPNd58Fq72TvmQW1IJuaZsYtgaiBoYBppmkCnTlJb_NmJEtZ9JBxogvFE6y8s3PVEdSbtLsIv-4ptpxkvLqjJDFFEcz0Ir","alert":"еще одно сообщение!"}' http://176.112.194.181:8801/api/v2/push
@adastreamer
adastreamer / yandex_email_for_domain_settings.py
Created January 18, 2016 21:54 — forked from nskeip/yandex_email_for_domain_settings.py
Django SMTP settings for yandex_for_domain mail (pdd.yandex.ru)
EMAIL_HOST = 'smtp.yandex.ru'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_PORT = 465
EMAIL_USE_TLS = True
1. First you need some unallocated space to create the partitions for each mountpoint (/var, /home, /tmp). Use Gparted for this.
2. Then you need to create the filesystems for those partitions (can be done with Gparted too) or use:
mkfs.ext4 /dev/sdaX
for example to create a new ext4 filesystem on the /dev/sdaX device (replace /dev/sdaX with your own device)
3. Mount the new filesystem under /mnt
mkdir /mnt/var
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
if(location.hostname.match('maleeonline')) {
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter32508370 = new Ya.Metrika({
id:32508370,
clickmap:true,
trackLinks:true,
<script type="text/javascript">
window.gaInit = function() {
$.getScript('//www.google-analytics.com/analytics.js'); // jQuery shortcut
window.ga = window.ga || function () { (ga.q = ga.q || []).push(arguments) }; ga.l = +new Date;
ga('create', 'UA-69738551-3', 'auto');
ga('require', 'linkid');
return ga;
};
window.gaTrack = function(path, title) {
var track = { page: path, title: title };
dokkur@vps47369:~$ wget https://raw.githubusercontent.com/dokku/dokku/v0.5.5/bootstrap.sh
--2016-04-18 08:36:13-- https://raw.githubusercontent.com/dokku/dokku/v0.5.5/bootstrap.sh
Распознаётся raw.githubusercontent.com (raw.githubusercontent.com)… 185.31.17.133
Подключение к raw.githubusercontent.com (raw.githubusercontent.com)|185.31.17.133|:443... соединение установлено.
HTTP-запрос отправлен. Ожидание ответа... 200 OK
Длина: 4858 (4,7K) [text/plain]
Сохранение в: «bootstrap.sh»
100%[==================================================================================================================================================================>] 4 858 --.-K/s за 0s
--2016-04-18 09:06:40-- https://raw.githubusercontent.com/dokku/dokku/v0.5.5/bootstrap.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.31.17.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.31.17.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4858 (4.7K) [text/plain]
Saving to: ‘bootstrap.sh’
100%[==================================================================================================================================================================>] 4,858 --.-K/s in 0s
2016-04-18 09:06:41 (895 MB/s) - ‘bootstrap.sh’ saved [4858/4858]