Skip to content

Instantly share code, notes, and snippets.

@Alexnder
Alexnder / AWSHelpers.md
Last active December 26, 2019 11:37
Upload, download code to AWS Lambda

install and configure aws-cli (the actual version is available in Python)

pip3 install awscli
aws configure

add and check another user

aws configure --profile new-name-name
aws --profile new-name-name sts get-caller-identity
@Alexnder
Alexnder / ubuntu-16-vino-vnc.md
Created June 25, 2019 06:38
Configure over ssh to accept remote VNC connections by VINO on Ubuntu 16.04 with Unity
export DISPLAY=:0
sudo -Hu youruser dbus-launch gsettings set org.gnome.Vino enabled true
sudo -Hu youruser dbus-launch gsettings set org.gnome.Vino require-encryption false
sudo -Hu youruser dbus-launch gsettings set org.gnome.Vino view-only false
sudo -Hu youruser dbus-launch gsettings set org.gnome.Vino prompt-enabled false
sudo -Hu youruser /usr/lib/vino/vino-server --sm-disable

It doesn't close opened apps

Fix unity slow animation

DISPLAY=:0 unity --replace

Fix that apps don't react to mouse clicks:

compiz --replace &
# run in administrator privileged command prompt window 
npm install --global --production windows-build-tools
npm update 

Disable suspend by closing

sudo vim /etc/systemd/logind.conf

Change param to HandleLidSwitch=ignore

systemctl restart systemd-logind

Git

(function() {
"use strict";
const ACTION_INTERVAL = 250;
let christmasEmojiTypes = ['snowflake', 'christmas_tree', 'snowman', 'snow_cloud'];
function getEmogies(container, type, reacted = '') {
if (reacted) {
reacted = ':not(.user_reacted)';
}
@Alexnder
Alexnder / batch.md
Created November 8, 2016 14:04
batch helper

phpunit.phar example

@php "%~dp0phpunit.phar" %*
git add .
set GIT_AUTHOR_DATE='Sat Oct 15 10:32:10 2016 +0300'
set GIT_COMMITTER_DATE='Sat Oct 15 10:32:10 2016 +0300'
git commit -m "Fixed"

start /b emulator -avd react-native

react-native init AwesomeProject

cd AwesomeProject

react-native run-android

@Alexnder
Alexnder / vim.md
Last active May 7, 2016 20:56
vim install & configure

create ~/.vimrc

cat > ~/.vimrc <<EOF
" activates filetype detection
filetype plugin indent on

" activates syntax highlighting among other things
syntax on

" allows you to deal with multiple unsaved