Skip to content

Instantly share code, notes, and snippets.

View awesome's full-sized avatar

So Awesome Man awesome

View GitHub Profile
@awesome
awesome / raven-shell
Created November 9, 2023 18:36 — forked from barroco/raven-shell
Send Sentry error from shell using curl
#!/bin/sh
SENTRY_KEY=
SENTRY_SECRET=
SENTRY_PROJECTID=1
SENTRY_HOST=sentry.example.com
SCRIPT_ARGUMENTS=$@
capture_error()
{
@awesome
awesome / .gitconfig
Created February 23, 2023 00:06 — forked from joelpittet/.gitconfig
kaleidoscope git mergetool config
# Kaleidoscope.app as difftool and mergetool.
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[diff]
tool = Kaleidoscope
[difftool]
prompt = false
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
@awesome
awesome / README.md
Created January 13, 2023 22:36 — forked from basti/README.md
AWS S3 CORS configuration for Rails ActiveStorage

AWS S3 now uses JSON for CORS configuration and cors.json is minimal configuration for Rails 7 direct uploads.

@awesome
awesome / load_dotenv.sh
Created January 13, 2023 20:30 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@awesome
awesome / guide: use puma-dev as proxy.md
Created October 26, 2022 18:32 — forked from rcugut/guide: use puma-dev as proxy.md
guide: use puma-dev as proxy
@awesome
awesome / gist:b592620313d4ff8712800b40d1e1511b
Created September 15, 2022 19:17 — forked from tayvano/gist:6e2d456a9897f55025e25035478a3a50
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@awesome
awesome / android-emulator-homebrew.sh
Created May 14, 2019 03:20 — forked from spilth/android-emulator-homebrew.sh
Android Emulator with Homebrew
touch ~/.android/repositories.cfg
brew cask install caskroom/versions/java8
brew cask install android-sdk
brew cask install intel-haxm
brew install qt
export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"
sdkmanager "platform-tools" "platforms;android-27" "extras;intel;Hardware_Accelerated_Execution_Manager" "build-tools;27.0.0" "system-images;android-27;google_apis;x86" "emulator"
avdmanager create avd -n test -k "system-images;android-27;google_apis;x86"
/usr/local/share/android-sdk/tools/emulator -avd test
@awesome
awesome / database.rake
Created April 19, 2019 10:48 — forked from olivierlacan/database.rake
Database rake tasks that I use on Code School to ferret out huge tables with millions of rows and see how many indices they have and to see which tables have missing indices on associated tables (foreign keys). The latter was taken from this great post by Tom Ward: https://tomafro.net/2009/09/quickly-list-missing-foreign-key-indexes
namespace :database do
task fat_tables: :environment do
c = ActiveRecord::Base.connection
max_table_name_width = 0
tables = c.tables.sort_by do |t|
max_table_name_width = t.length if t.length > max_table_name_width
@awesome
awesome / dotnetlayout.md
Created March 28, 2019 16:32 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@awesome
awesome / Simple Ruby Class Example.rb
Created March 11, 2019 04:24 — forked from dougal/Simple Ruby Class Example.rb
Simple Ruby Class Example
class Badger
attr_accessor :name, :size # Creates getter and setter methods.
def initialize(name, size)
@name = name
@size = size
end
# Instance method