Skip to content

Instantly share code, notes, and snippets.

View dchapkine's full-sized avatar

Dmitri Chapkine dchapkine

View GitHub Profile
@dchapkine
dchapkine / Dockerfile
Created April 1, 2022 00:57 — forked from avishayp/Dockerfile
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
https://stevenkohlmeyer.com/fixing-palm-detect-ubuntu-14-04/
```
xinput list
xinput list-props 13
xinput set-prop 13 "Synaptics Palm Detection" 1
```
@dchapkine
dchapkine / gist:5df40ffff5571c91f967337a6d7c80b1
Created December 9, 2016 13:50
Free space on /boot aka remove old kernels on ubuntu
# List all kernels installed
```
dpkg -l linux-image-\* | grep ^ii
```
# Remove old kernels
@dchapkine
dchapkine / gist:3b5c444052ace67052210ea4c18cb069
Last active December 5, 2016 08:34
push new npm version
# assuming our last package version is v1.0.0
# this will increment the package.json version, and commit change
# it's equivalent to git tag v1.0.1, update manualy package.json and git add package.json && git commit -m "bump version"
npm version patch
# then we need to push it into our repo
git push v1.0.1
@dchapkine
dchapkine / gist:d6432be27f001c4dc0d03d645f141a8d
Created November 16, 2016 13:30
Add custom 16/9 resolution ubuntu 14.04/16.04
## generate modeline
```
cvt 1600 900 60
```
outputs:
```
@dchapkine
dchapkine / hellonode-v2
Last active August 1, 2016 06:00
Tests (ignore it)
var http = require('http');
var os = require("os");
var hostname = os.hostname();
var pid = process.pid;
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Node example works [V2] @"+hostname+"/"+pid+" \n");
});
@dchapkine
dchapkine / How to Install redmine_bitbucket plugin for REDMINE
Last active June 14, 2016 20:19
How to Install redmine_bitbucket plugin for bitnami redmine
# Install redmine_bitbucket plugin, by following instructions in README
https://bitbucket.org/steveqx/redmine_bitbucket
# create new ssh key
ssh-keygen -t rsa -C "contact@example.com"
# add public key to your bitbucket account as deploy key
cat ~/.ssh/id_rsa.pub
# answer yes to add bitbucket to known hosts
@dchapkine
dchapkine / gist:10a3fc38f0054fc6745299aee6452003
Created April 23, 2016 21:12
ubuntu resolution snippets
# list displays and possible resolutions of active displays
xrandr
# set display port 1 to 3440x1440@29hz
xrandr --output DP1 --mode 3440x1440 --rate 29
# set display port 1 to 2560x1080@59hz
xrandr --output DP1 --mode 2560x1080 --rate 59
```
gnome-shell --replace
```
http://superuser.com/questions/570194/how-do-i-restart-a-frozen-screen-in-ubuntu-without-losing-any-open-windows
@dchapkine
dchapkine / gist:1f74b640cd157831345f
Created March 20, 2016 08:50
Anonymise twitter feed
$("img.avatar.js-action-profile-avatar").attr("src", "");
$("span.username b").text("user");
$("strong.fullname").html("user");