Skip to content

Instantly share code, notes, and snippets.

View chepetime's full-sized avatar
🎯
Focusing

José M. Gulias Lugo chepetime

🎯
Focusing
View GitHub Profile
@chepetime
chepetime / find_and_kill_process_in_port.sh
Created August 21, 2019 15:28
Find ports and kill the process running in them
# Find all ports
sudo lsof -i -P -n | grep LISTEN
# Find a specific port
sudo lsof -i:52698
sudo lsof -i:8080
# Kill the process in a single port
fuser -k 52698/tcp
fuser -k 8080/tcp
@chepetime
chepetime / osx-for-hackers.sh
Created July 23, 2019 20:11 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@chepetime
chepetime / update_npm_packages.sh
Created July 5, 2019 14:11
Update npm packages
nvm install
rm -rf node_modules
npm outdated
npm install -g npm-check-updates
ncu -u
npm update
cd /Library/Preferences/SystemConfiguration
sudo mv ./com.apple.airport.preferences.plist _com.apple.airport.preferences.plist
sudo mv ./com.apple.network.identification.plist _com.apple.network.identification.plist
sudo mv ./com.apple.wifi.message-tracer.plist _com.apple.wifi.message-tracer.plist
sudo mv ./NetworkInterfaces.plist _NetworkInterfaces.plist
sudo mv ./preferences.plist _preferences.plist
sudo shutdown -r now
Create a .zip file from the git structure
```
git archive -o whirlpool_blog.zip HEAD
# Preview webp images
curl -L https://raw.github.com/emin/WebPQuickLook/master/install.sh | sh
@chepetime
chepetime / macos-verbose-wifi-diagnostics.md
Created May 30, 2019 03:18
macOs Verbose WIFI Diagnostic

Verbose WIFI Diagnostic

Information on the current state of the wifi:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I

Scan the available wifis and give a full report:

@chepetime
chepetime / Transform PDF to mp3.md
Last active April 24, 2019 15:57
Transform PDF to mp3

Transform PDF to mp3

Install dependencies

brew install Caskroom/cask/xquartz xpdf
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac

Transform the pdf to mp3 audio

@chepetime
chepetime / get_file_sizes_order.sh
Created April 8, 2019 21:27
Get files from a directory ordered by size
du -hs --apparent-size * | sort -h
79 lines (61 sloc) 3.27 KB
## Start staks
echo Start
## Install devtools
xcode-select --install
## Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"