Skip to content

Instantly share code, notes, and snippets.

View laraconda's full-sized avatar
👽

Lara laraconda

👽
  • México City
View GitHub Profile
@laraconda
laraconda / change_brightness
Created September 12, 2023 23:24
Change screen brightness by percentage in linux systems
#!/bin/bash
#
# Brightness Control Script
#
# This script allows you to adjust the screen brightness on your system by
# providing a **percentage change**. It reads the current brightness level from
# /sys/class/backlight/intel_backlight/brightness, calculates the new value
# based on the percentage change, ensures it doesn't exceed the maximum
# brightness from /sys/class/backlight/intel_backlight/max_brightness, and
@laraconda
laraconda / .vimrc
Last active January 23, 2023 20:33
My vim conf
set encoding=utf-8
" IMPORTANT! junegunn/vim-plug must be installed to handle the listed plugs
call plug#begin('~/.vim/plugged')
Plug 'gilgigilgil/anderson.vim'
Plug 'dracula/vim', {'as': 'dracula'}
Plug 'andreasvc/vim-256noir'
Plug 'zacanger/angr.vim'
Plug 'tyrannicaltoucan/vim-deep-space'
Plug 'yorickpeterse/happy_hacking.vim'
#!/bin/sh
# setup_config - Create necessary files so you can use the config
# command to explain and describe the configuration of your computer
path_config_file=/home/config
if [ ! -f $path_config_file ]; then
sudo touch $path_config_file
fi
sudo chmod 664 $path_config_file
text="Describe the config of your computer in $path_config_file"
@laraconda
laraconda / setup_motd
Last active January 14, 2017 02:03
Installs necessary software and creates files in order to be able to use a dynamic MOTD.
#!/bin/sh
#
# setup_motd - Create necesary files to display a dynamic MOTD
sudo apt-get install figlet
motdd_location=/etc/update-motd.d
sudo mkdir -p $motdd_location
default_motd_location=/etc/motd
@laraconda
laraconda / 00-head
Last active January 13, 2017 21:31
Compose the MOTD.
#!/bin/sh
#
# 00-header - create the header of the MOTD
# Copyright (c) 2013 Nick Charlton
# Copyright (c) 2009-2010 Canonical Ltd.
#
# Authors: Nick Charlton <hello@nickcharlton.net>
# Dustin Kirkland <kirkland@canonical.com>
#
# This program is free software; you can redistribute it and/or modify
#!/bin/sh
# Set env vars from a file in the same dir as this script.
for ENVV in `cat $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/[env_vars_raw]`
do
export $ENVV
done
@laraconda
laraconda / post-merge
Last active December 29, 2016 00:01
Change the ownership of files in a project after a git [merge]. This file must be placed in .git/hooks/.
#!/bin/sh
echo "Your message"
sudo chgrp -R [grp] [a/dir]
# Changing ownership of sockets
sudo chgrp www-data [a/dir]/*.sock
# Permissions must be 755
# To use this file after a git checkout name it: post-checkout