Skip to content

Instantly share code, notes, and snippets.

View rkmax's full-sized avatar

Julian Reyes Escrigas rkmax

View GitHub Profile
#!/usr/bin/env python
import subprocess
import sys
SCREEN_LAYOUT = {
'horizontal': {
'full-size': '0,0,{width},{height}',
'half-left': '0,0,{width}/2,{height}',
'half-right': '{width}/2,0,{width}/2,{height}',
Coverage Badges
@rkmax
rkmax / camera-zoom.sh
Created December 1, 2022 17:21
this script uses v4l2-ctl to set the zoom level of a webcam
#!/usr/bin/env bash
#
# this script uses v4l2-ctl to set the zoom level of a webcam
#
set -e
# you may have multiple cameras but usual video0 is the right one
camera=/dev/video0
#!/usr/bin/env bash
set -e
target_osx=$(sw_vers -productVersion)
project_dir=/Users/rkmax/development/aseprite
skia_dir=/Users/rkmax/development/skia
arch="$(uname -m)"
bundle_trial_url=https://www.aseprite.org/downloads/trial/Aseprite-v1.2.40-trial-macOS.dmg
@rkmax
rkmax / update-wordpress-domain.sql
Created August 23, 2019 19:33
Safe domain transition for wordpress
set @old_domain = '';
set @new_domain = '';
-- Update post
UPDATE wp_posts
SET guid = replace(guid, @old_domain, @new_domain),
post_content = replace(post_content, @old_domain, @new_domain);
UPDATE wp_postmeta
SET meta_value = replace(meta_value, @old_domain, @new_domain);
@rkmax
rkmax / deploy-cloudfront-page.sh
Created July 2, 2019 15:04
Deploys a directory to s3 bucket
#!/usr/bin/env bash
usage() {
cat << EOF
NAME
deploy-cloudfront-page
SYNOPSIS
deploy-cloudfront-page </path/directory/dist> <s3-bucket-name> [cf-distribution-id]
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev
function latest_version() {
curl -sL https://api.github.com/repos/creationix/nvm/releases/latest \
| grep 'tag_name' \
| cut -d '"' -f 4
}
export DEBIAN_FRONTEND=noninteractive
export DOCKER_COMPOSE_VERSION=1.23.2
sudo apt-get update -y
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
import PropTypes from 'prop-types'
const Note = (props) => (
<div>~{props.content.title}</div>
)
const Notes = (props) => (
<div>
There are {props.notes.length} Notes
{props.notes.map(note => <Note {...note}/>)}
1. Download and install NVIDIA-Linux-x86_64-390.48.run
2. enable multilib repository
2. install lib32-libx11 lib32-glibc lib32-glib2