Skip to content

Instantly share code, notes, and snippets.

@rderik
rderik / PARALLELS
Created May 13, 2020 12:56
FreeBSD 12.1 - Custom Kernel configuration to be used on my Paralles Virtual Machine
#
# GENERIC -- Generic kernel configuration file for FreeBSD/amd64
#
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
@rderik
rderik / .gitignore
Created August 28, 2019 20:44
Xcode gitignore template
# Xcode
## Build generated
build/
DerivedData/
## Various settings
ExportOptions.plist
*.pbxuser
!default.pbxuser
@rderik
rderik / prowl.sh
Created January 4, 2019 22:43
Curl Prowl API call
#https://www.prowlapp.com/api.php#add
curl https://api.prowlapp.com/publicapi/add -F apikey=KEY -F priority=0 -F application=“DJRC Test” -F event=“cache cleared” -F description=“Dev ya termino!”
function dealWithKeys(evt)
curr_modifiers = evt:getFlags()
print(curr_modifiers["ctrl"])
print("========================")
mod_table = { ["ctrl"] = true }
print(mod_table['ctrl'])
if (curr_modifiers.contain({ "ctrl" })) then
print "Only has Control"
else
print "Might have something else"
@rderik
rderik / setup_dev_env.sh
Last active August 16, 2018 10:59
Basic setup script for new laptop
#!/usr/bin/env sh
dotfile_dir="$HOME/Documents/Development/configuration/dotfiles"
git_repo="https://github.com/rderik/dotfiles.git"
if [ -d $dotfile_dir ]; then
echo "$dot_file already exists exists"
else
echo "Doesn't exists"
mkdir -p $dotfile_dir
git clone $git_repo $dotfile_dir
if [ $? -eq 0 ]; then
@rderik
rderik / CTags txt
Created February 14, 2018 20:51
ctags cofiguration
# Generate CTags of current directory
ctags -R .
# this will generate a file tags
# add it to the git ignore
echo "tags" >> ~/.gitignore_global
# configure your vimrc to search current dir, then add other tags you wish to read
set tags=./tags,$HOME/other_project/tags,$DEVPATH/project2/tags
@rderik
rderik / vim-termina-integration-cs.txt
Last active February 9, 2018 12:29
Vim Terminal Integration Cheat Sheet #vim
#Enter command mode
<C-w> :
#Enter Terminal Normal mode , then press i to go back
<C-w> N
# Close window without stopping the job
<C-w> :hide
#view buffers
:ls
@rderik
rderik / standar-file-permissions.sh
Last active February 8, 2018 21:48
Applies standard secure file permissions to normal files and directories
#search for Directories and set the permissions to 755
find . -type d -exec chmod 755 {} \;
#search for files and set the permissions to 644
find . -type f -exec chmod 644 {} \;