Skip to content

Instantly share code, notes, and snippets.

View ssaunier's full-sized avatar

Sébastien Saunier ssaunier

View GitHub Profile

Fixing Webpacker 3.3.0 + Rails 5.1.5

Heroku hosting trouble

Heroku may not detect a correct buildpack for your JS dependencies, then you have to set it manually:

heroku buildpacks:add heroku/nodejs -i 1
heroku buildpacks:add --index 2 https://github.com/heroku/heroku-buildpack-ruby
@ssaunier
ssaunier / README.md
Last active August 1, 2023 21:28
Adding Le Wagon to your Linkedin Profil
  • vérifier le niveau des piles du micro HF émétteur + récepteur
  • fixer le recepteur sur le shoe mount de la caméra
  • brancher le cable dans l'entrée mini-jack de la caméra
  • mettre la camera sur pied en glissant la semelle dans la tête fluide
  • brancher la caméra sur secteur
  • allumer la camera en appuyant sur le bouton power attention il peut parfois rester coincé
  • vérifier qu'il n'y a pas de faux contact, un petit éclair doit apparaitre sur le voyant de charge
  • vérifier les settings sur l'écran: 1080p25 ProRes Proxy F2.8 ISO 800
  • si besoin l'image est trop sombre/claire modifier l'ISO dans MENU>SETTINGS>CAMERA SETTINGS>ISO
  • si besoin l'image est trop chaude/froide modifier la balance des blancs dans MENU>SETTINGS>CAMERA SETTINGS>WHITE BALANCE
@nateberkopec
nateberkopec / 0.result.md
Last active January 18, 2024 11:20 — forked from tomfuertes/0.result.md
De-'Async Inject'ing Universal Analytics

De-'Async Inject' Universal Analytics

This gist applies the theory from Ilya Grigorik's Script-injected "async scripts" considered harmful on the default Universal Analytics snippet. TLDR place this above the CSS in the <head> of your document

<!-- Google Analytics Part 1: Creates window.ga, sets account, and queues pageview-->
<script>
  !function(n,t){n.GoogleAnalyticsObject=t,n[t]=n[t]||function(){(n[t].q=n[t].q||[]).push(arguments)},n[t].l=1*new Date}(window,"ga");
  ga('create', 'UA-XXXX-Y', 'auto'); // REPLACE UA-XXXX-Y w/ YOUR ACCOUNT
 ga('send', 'pageview');
@adrienjoly
adrienjoly / startup-noob-guide.md
Last active March 31, 2024 04:37
Startup Noob Guide: Tips and resources on how to test, develop your startup idea, or find a developer/associate/CTO

Startup Noob Guide (bit.ly/startupnoob)

If you want to create a startup, and you've never done that before, you should consult the resources that are relevant to your situation.

[FR] Si vous comprenez le français, je vous invite à regarder la vidéo de mon pote Shubham qui résume assez bien le plus gros des conseils de cette page, en 8 minutes: Vous avez une idée de startup ?.

[FR] ...et si vous voulez comprendre tout ce contenu de manière plus efficace et ludique, inscrivez-vous sur mon MOOC "Startup Tour: créez votre startup en 3h" (gratuit).


@Papillard
Papillard / rails-kickoff.md
Last active December 1, 2021 02:07
Kick-off cheat sheet to set your Rails app @lewagon

This is a kick-off roadmap for the lead-developer, in charge of setup / deployment / collaboration.

Rails new

Create the project locally and on Github

$ rails new YOUR_APP_NAME -T --database=postgresql
$ cd YOUR_APP_NAME
$ git init

#cargo, docker hub without docker, how to

18 Jan 2015

###Background

I have been using linux containers for almost 2 years now. It started during an internship at Applidget, a startup in Paris. My job was to integrate linux containers technology in their private PaaS. At this time, there where no doubt, the technology to use was LXC. One week or so after I started digging into LXC, one of my co-worker talked to me about this new thing called docker. He told me "isn't it what you are supposed to do during your internship ?". And it was kind of it.

At this time I already highlighted a big challenge of containers in PaaS: creation time. Waiting for bundle install to complete is already long enough to have to wait for another 40 secondes to create a container :). Docker landed just in time !

@ssaunier
ssaunier / heroku-checklist.md
Last active March 22, 2018 08:03
Heroku Checklist
  • Buy a domain and map a CNAME to your Heroku app. Use www.example.com, not example.com
  • Register to Uptime Robot and set up a monitor on your website (keeps dyno alive!)
  • Use Unicorn as the Webserver
  • Add the Heroku add-on PG Backups with automatic backups and monthly retention
  • Install NewRelic (provision the add-on and skip to the Ruby section)
  • Add SPF and DKIM records to your Mandrill account if you send email with @yourdomain.com
  • If your website uses Devise, buy a SSL certificate and set it up to get a https:// URL. Otherwise passwords are in cl
@ssaunier
ssaunier / db.rake
Last active January 8, 2021 11:46 — forked from abstractcoder/import.rake
Rake task to back up heroku database and restore it locally.
namespace :db do
desc "Backs up heroku database and restores it locally."
task import_from_heroku: [ :environment, :create ] do
HEROKU_APP_NAME = nil # Change this if app name is not picked up by `heroku` git remote.
c = Rails.configuration.database_configuration[Rails.env]
heroku_app_flag = HEROKU_APP_NAME ? " --app #{HEROKU_APP_NAME}" : nil
Bundler.with_clean_env do
puts "[1/4] Capturing backup on Heroku"
`heroku pg:backups capture DATABASE_URL#{heroku_app_flag}`
@apneadiving
apneadiving / before.rb
Last active August 29, 2015 14:07
The before is some standard code, `with_waterfall` presents another way to write it (fully chainable)
# In controller
result = TaxCalculator.new(order).call
if result[:success]
render json: { value: result[:value] }
else
render json: { errors: result[:errors] }, status: 422
end
# The service
class TaxCalculator