Skip to content

Instantly share code, notes, and snippets.

View e10a's full-sized avatar
😄

ellen e10a

😄
  • Los Angeles, CA
View GitHub Profile
defaults write com.apple.finder "AppleShowAllFiles" -bool "true" && killall Finder
@e10a
e10a / _
Last active February 27, 2025 19:45
_git
# Fetch latest changes before merging
git fetch origin
# Push updated branch after merging
git push origin my-feature-branch
# Use rebase instead of merge (cleaner history)
git rebase master
@e10a
e10a / Rocksbox - Turn off captcha
Last active April 25, 2024 09:38
Rocksbox - Turn off captcha
# application.yml
ENABLE_RECAPTCHA: 'false' # ENABLE_RECAPTCHA: 'true'
@e10a
e10a / slim - loops
Last active April 25, 2024 08:46
slim - loops
- @footer_headers = [ \
{:link => 'link1', :name => 'name1' },
{:link => 'link1', :name => 'name1' },
{:link => 'link1', :name => 'name1' }]
div
- @footer_headers.each do | row |
- var = ""
- var = "focus" if row[:focus]
span class="#{var}"
@e10a
e10a / clear cache
Last active September 5, 2024 16:06
_rails
Rails.cache.redis.keys.select {|k| k.include? 'Inventory Service'}.each {|k| Rails.cache.delete(k)}
Rails.cache.redis.keys.select {|k| k.include? 'Inventory Service'}.each {|k| Rails.cache.delete(k)}
C.all.each {|c| c.update(password: 'p@ssword!')}
Rails.cache.redis.keys.select {|k| k.include? 'exclusive_collab'}.each {|k| k}
Rails.cache.redis.keys.select {|k| k.include? 'exclusive_collab'}.each {|k| Rails.cache.delete(k)}
@e10a
e10a / heroku config get database url
Created April 17, 2024 17:58
heroku config get database url
heroku config:get DATABASE_URL -a karat-development
@e10a
e10a / aws s3
Last active November 25, 2024 15:47
aws s3
aws s3api put-object-acl --bucket rocksbox --key site/homepage/2024/phase1/LO-HP-Hero-Desktop.jpg --acl public-read
aws s3api put-object-acl --bucket rocksbox --key site/homepage/2024/phase1/LO-HP-Hero-Mobile.jpg --acl public-read
aws s3api get-object-acl --bucket rocksbox --key site/homepage/2024/phase1/filename.xxx
@e10a
e10a / update-user-email
Last active March 31, 2022 18:35
Update user email
UPDATE users
SET email=CONCAT('test+', id, '_', REPLACE(email, SUBSTR(email,INSTR(email,'@')+1),'amava.com'))
WHERE email NOT LIKE '%@amava.com';
@e10a
e10a / kill-and-restart-docker-desktop
Created February 22, 2022 00:34
Kill and restart docker desktop
killall Docker && open /Applications/Docker.app