Skip to content

Instantly share code, notes, and snippets.

View linuxoid69's full-sized avatar
🏠
Working from home

Rustam linuxoid69

🏠
Working from home
View GitHub Profile
server {
listen 80;
server_name example.com;
root '/var/www/example.com/htdocs';
location / {
root '/var/www/example.com/htdocs';
index index.php;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
@linuxoid69
linuxoid69 / switch_layout.sh
Created June 9, 2015 15:37
keyboard layout
#!/bin/bash
CURRENT=$(setxkbmap -query | grep layout | awk '{print $2}')
if [[ $CURRENT == 'ru' ]]
then
setxkbmap us
else
setxkbmap ru
fi
@linuxoid69
linuxoid69 / color
Last active February 6, 2024 16:56
man color gentoo
# красно-зеленая
export LESS_TERMCAP_mb=$'\033[01;31m'
export LESS_TERMCAP_md=$'\033[01;31m'
export LESS_TERMCAP_me=$'\033[0m'
export LESS_TERMCAP_se=$'\033[0m'
export LESS_TERMCAP_so=$'\033[01;44;33m'
export LESS_TERMCAP_ue=$'\033[0m'
export LESS_TERMCAP_us=$'\033[01;32m'
export LESS=-r
export GROFF_NO_SGR=1
@linuxoid69
linuxoid69 / jabber_cli
Created July 16, 2015 14:48
jabber cli
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import xmpp,sys
xmpp_jid = 'noreply@some.jabber.server'
xmpp_pwd = 'noreplypass'
to = sys.argv[1]
msg = sys.argv[2]
@linuxoid69
linuxoid69 / groovy xml parser
Last active October 21, 2015 13:31
groovy xml parser
task parseXml() {
def fileXml = new File('xmlexample.xml')
def resources = new XmlSlurper().parseText(fileXml.getText())
if (resources.string[0].@name == 'host'){
resources.string[0]= 'localhost'
}
def f = XmlUtil.serialize(resources)
def of = new File('xmlexample2.xml')
@linuxoid69
linuxoid69 / Vagrantfile
Last active October 27, 2015 12:10
vagrant-test
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@linuxoid69
linuxoid69 / PackageApplication.patch
Created October 28, 2015 07:31
patch /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication 2015-10-06 00:07:37.000000000 +0300
+++ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication.old 2015-10-27 18:10:59.000000000 +0300
@@ -152,9 +152,8 @@
}
}
- my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements,resource-rules",
- "--sign", $opt{sign},
- "--resource-rules=$destApp/ResourceRules.plist");
+ my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements",
@linuxoid69
linuxoid69 / token_ya_disk
Created December 24, 2015 12:24
Получение токена для яндекс диска
# -*- coding: utf-8 -*-
from bottle import route, run, request
import httplib
import urllib
import json
#Идентификатор приложения
client_id = ''
#Пароль приложения
client_secret = ''
@linuxoid69
linuxoid69 / i3config
Created February 5, 2016 07:19
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@linuxoid69
linuxoid69 / i3status.conf
Created February 5, 2016 07:21
i3status.conf
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true