Skip to content

Instantly share code, notes, and snippets.

@FZX
FZX / Preferences
Created October 30, 2016 22:01
Chromium Preferences
{"account_id_migration_state":2,"account_tracker_service_last_update":"13122335845286402","browser":{"clear_lso_data_enabled":true,"custom_chrome_frame":true,"last_known_google_url":"https://www.google.ge/","pepper_flash_settings_enabled":true,"window_placement":{"bottom":754,"docked":false,"left":20,"maximized":true,"right":1386,"top":20,"work_area_bottom":734,"work_area_left":0,"work_area_right":1366,"work_area_top":0}},"countryid_at_install":18242,"credentials_enable_service":false,"data_reduction":{"daily_original_length":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","10858972","28032356"],"daily_original_length_application":"4937223","daily_original_length_unknown":"1161169","daily_original_length_via_data_reduction_proxy":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0
@FZX
FZX / rc.xml
Created October 30, 2016 22:12
OpenBox config file.
<?xml version="1.0"?>
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
<!-- always try to focus new windows when they appear. other rules do
apply -->
@FZX
FZX / confs.conf
Last active October 30, 2016 22:24
Xfce config
sudo apt-get update && sudo apt-get install -y chromium-browser && setxkbmap -option grp:switch,grp:alt_shift_toggle us,ge && sudo timedatectl set-timezone Asia/Tbilisi && xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 14 && xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-battery -s 14 && echo '{ "ProxyMode": "pac_script", "ProxyPacUrl": "http://mediahint.com/default.pac", }' | sudo tee -a /etc/chromium-browser/policies/managed/proxyConfig && wget -O /home/cub/.config/chromium/Default/Preferences https://gist.githubusercontent.com/FZX/f9eb015126b2ebfdc263bfbd9db36175/raw/36ef6a294f037b545b35939d8415f81a6714cc3e/Preferences && wget -O /home/cub/.config/openbox/rc.xml https://gist.githubusercontent.com/FZX/792cacbee704680b8d4214a58634fe74/raw/3f566826576b95d23682fee7e5c34f675588a217/rc.xml && openbox --reconfigure && nitrogen --set-auto /usr/share/wallpapers/14837563893_e84f12a70c_k_www.flickr.com_groups_freeuse.jpg
@FZX
FZX / config
Created November 1, 2016 20:29
Configure Linux Mint
sudo apt-get update && sudo apt-get install -y chromium-browser git vim && setxkbmap -option grp:switch,grp:alt_shift_toggle us,ge && sudo timedatectl set-timezone Asia/Tbilisi && echo '{ "ProxyMode": "pac_script", "ProxyPacUrl": "http://mediahint.com/default.pac", }' | sudo tee -a /etc/chromium-browser/policies/managed/proxyConfig && wget -O /home/mint/.config/chromium/Default/Preferences https://gist.githubusercontent.com/FZX/d37d11850ffc4cfe108ab11254f21408/raw/02ee58fc117d45367c8177d4b09bffd0ac23e3fd/mintchromium && wget -O /home/cub/.config/openbox/rc.xml https://gist.githubusercontent.com/FZX/792cacbee704680b8d4214a58634fe74/raw/3f566826576b95d23682fee7e5c34f675588a217/rc.xml && openbox --reconfigure && nitrogen --set-auto /usr/share/wallpapers/14837563893_e84f12a70c_k_www.flickr.com_groups_freeuse.jpg
@FZX
FZX / brightness.py
Last active November 16, 2016 19:02
Ubuntu / Linux Mint Brightness control. I could not find real fix for problem with keys changing brightness level on my laptop. So wrote little Python 3 script. Add alias to this file in .bashrc
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 FZX <FZX@users.noreply.github.com>
#
# Distributed under terms of the GPL v2.0 license.
"""
Controlling brightness for nv_backlight.
@FZX
FZX / Random Vimrc
Last active December 27, 2016 08:14
Random Vimrc
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
" "
" __ _ _ _ __ ___ _ __ ___ "
" \ \ / / | '_ ` _ \| '__/ __| "
" \ V /| | | | | | | | | (__ "
" \_/ |_|_| |_| |_|_| \___| "
" "
" "
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@FZX
FZX / checkdomain.py
Created February 4, 2017 22:04
Python3 Check domain with Godaddy API
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
# Distributed under terms of the MIT license.
import requests
def check_domain(domain):
@FZX
FZX / gevent.py
Created April 23, 2017 10:43 — forked from scturtle/gevent.py
Let's go HTTPS!
from gevent import monkey
monkey.patch_all()
import bottle
class SSLWebServer(bottle.ServerAdapter):
def run(self, handler):
from gevent.pywsgi import WSGIServer
srv = WSGIServer((self.host, self.port), handler,
certfile='/etc/letsencrypt/live/XXX/fullchain.pem',
<!DOCTYPE html>
<html lang="ka-GE"
xmlns:fb="http://ogp.me/ns/fb#" prefix="og: http://ogp.me/ns#">
<head>
<link rel="stylesheet" href="/wp-content/themes/flex-mag/css/alk-sanet.min.css">
<link rel="stylesheet" href="/wp-content/themes/flex-mag/css/bpg-glaho.min.css">
<meta charset="UTF-8" >
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
var json_data = null;
function get_data(mode){
$.ajax({
url: "/json_nodes",
method: "POST",
data: {func: "init"},
success: function(json){
json_data = json;
//console.log(json_data);
}