Skip to content

Instantly share code, notes, and snippets.

View e10a's full-sized avatar
😄

ellen e10a

😄
  • Los Angeles, CA
View GitHub Profile
@e10a
e10a / aws s3
Last active May 2, 2024 19:13
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
@roberto-butti
roberto-butti / node-cache.yml
Created February 6, 2021 09:14
snippet for githubactions workflow with node_modules caching
name: Test Laravel Github action
on:
push:
branches:
- main
- develop
- features/**
jobs:
laravel-tests:
@altynbek07
altynbek07 / README.md
Last active March 25, 2022 22:42
Switch PHP Version in Laravel Valet

Switch PHP Version in Laravel Valet

For me, the valet use php@7.3 command does not work. And so I created this bash function.

Install

I already have PHP versions 7.2, 7.3 and 7.4 installed via Homebrew. Add this function in your .bash_profile or .zshrc file:

# Switch PHP version
switch-php() {
@jherax
jherax / configure.md
Last active May 2, 2024 21:54
VS Code: Debugging with Jest

VS Code: Debugging Jest

Sometimes, debugging with console.log is not enough to find out what is happening in the code, as console.log prints only plain objects but neither functions nor objects with circular references. Besides, it's possible you may need to know the context and flow of the code.

Read more about debugging with VS Code in VS Code: Debugging.

@zdennis
zdennis / browser_logging.rb
Created June 26, 2018 19:11
Chromedriver browser logging for Capybara
# browser_logging.rb will print out the browser log from Chrome
# when running specs with "js: true". This is so we can easily debug
# issues where there are JS errors or other console warnings/error(s), etc.
#
# Output file is: Rails.root/log/browser.log
#
# Note: Nothing will be printed out for non-JS examples.
RSpec.configure do |config|
browser_log = File.new(Rails.root.join("log/browser.log").to_s, "w")
browser_log.sync = true
@raditotev
raditotev / capybara_waiting_methods.rb
Created December 3, 2017 19:29
Capybara waiting methods
# If you want to make sure there's exactly one
find(".active").click
# If you just want the first element
find(".active", match: :first).click
# All matching elements
find(".active", match: :first) # Wait for the first element
all(".active").each(&:click)
@bgarrant
bgarrant / ValetSwitchPHP.md
Last active September 30, 2022 08:08
How to Switch PHP Version in Laravel Valet between PHP 7.1 and PHP 5.6

How to Switch PHP Version in Laravel Valet between PHP 7.1 and PHP 5.6

Valet switch PHP version with these commands

Install PHP 5.6 and switch Valet to PHP 5.6

valet stop
brew unlink php71
brew install php56
brew install php56-mcrypt
@antonkomarev
antonkomarev / gist:907667d2aa3c972b6b7d290664290ac6
Created August 22, 2016 20:14
Call Laravel artisan without memory limit
php -d memory_limit=8000M artisan migrate:refresh --seed
@jarretmoses
jarretmoses / React Native Clear Cache
Last active March 11, 2024 10:20
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
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run 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 - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using UIKit;
using MyAppName.iOS.Renderers;