Skip to content

Instantly share code, notes, and snippets.

@faridescate
faridescate / centos.sh
Last active October 21, 2019 20:48
useful linux commands
# Show a ordered list of folders with size
du -sch * | sort -rh
# count lines from output
<command> | wc -l
# change primary group
usermod -g primarygroupname username
# apache - SELinux
#!/bin/sh
#--- Tested in Centos 7 ---#
#--- should run with sudo privileges ---#
GIT_VERSION=2.21.0
yum -y groupinstall "Development Tools"
yum -y install zlib-devel
yum -y install curl-devel
wget https://github.com/git/git/archive/v$GIT_VERSION.tar.gz -O git.tar.gz
@faridescate
faridescate / React Native Clear Cache
Last active August 20, 2018 21:04 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50
watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows
@faridescate
faridescate / cloudSettings
Last active April 9, 2019 22:35 — forked from spencercarli/bd3d4befe38185704bf0fc875e9deed6|configuration.json
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-04-09T22:35:04.925Z","extensionVersion":"v3.2.7"}
@faridescate
faridescate / rsync.sh
Created May 9, 2018 16:48
Sincroniza dos carpetas
rsync -avzrPL --delete -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress [username]@[IP]:[SOURCE_REMOTE_PATH] [DESTINATION_LOCAL_PATH]
@faridescate
faridescate / deleteOldFiles.sh
Created May 9, 2018 16:46
Borra archivos con antiguedad mayor a 20 dias
#!/bin/bash
/** Borra archivos con antiguedad mayor a 20 dias **/
sudo find ./ -mindepth 1 -mtime +20 -delete
@faridescate
faridescate / ssl-setup.sh
Created September 6, 2016 07:56 — forked from leevigraham/ssl-setup.sh
Create Self Signed Certificate for Apache on OSX Mountain Lion: http://www.akadia.com/services/ssh_test_certificate.html
mkdir ~/Desktop/ssl
cd ~/Desktop/ssl
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
sudo cp server.crt /private/etc/apache2/server.crt
sudo cp server.key /private/etc/apache2/server.key