Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh -e
# 1) Disable of gnome control over keyboard:
gsettings set org.gnome.settings-daemon.plugins.keyboard active false
# 2) Set desired settings for xkb:
setxkbmap -option grp:rctrl_toggle,lv3:menu_switch us,ru
@Gennnji
Gennnji / composer-install.sh
Last active February 19, 2019 13:50
Install tools on Ubuntu
#!/bin/sh
EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
@Gennnji
Gennnji / .zshrc
Last active February 4, 2019 09:43
Installing oh-my-zsh
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/genji/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@Gennnji
Gennnji / containers_App.js
Created January 11, 2019 15:54
Install React from Scratch
import React, {Component} from 'react';
export default class App extends Component {
render () {
return <p>This is my new react app</p>
}
}
1. ^[^\-]|(?<!^)[^\d\.] - Search for every symbol except digits and first minus
@Gennnji
Gennnji / 0_reuse_code.js
Created September 25, 2017 13:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console