Skip to content

Instantly share code, notes, and snippets.

@ayaz-ac
ayaz-ac / main.sh
Created March 30, 2022 16:50
Bash function to checkout and update dependencies in a Rails project
cob() {
git checkout $1
git fetch origin
update_js="$(git diff --name-only origin/$1 package.json)"
update_sql="$(git diff --name-only origin/$1 db/structure.sql)"
update_gem="$(git diff --name-only origin/$1 Gemfile)"
git pull
@ayaz-ac
ayaz-ac / main.rb
Created February 13, 2022 02:29
Clean Twitter account
require 'twitter'
# SETUP
# Create an app on https://developer.twitter.com
# Be sure that you enabled OAUTH 1.0A with the 'Read and write and Direct message' in your twitter app
# For the required URLs (callback, website, etc.) you can put a random domain name, ex: https//localhost.com
# Initialize client with credentials
# Note: Consumer Key = API Key and Consumer Secret = API Secret