Skip to content

Instantly share code, notes, and snippets.

View mogox's full-sized avatar
🇲🇽
🤖

Enrique Carlos Mogollan mogox

🇲🇽
🤖
View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

;;; APIfy Estafeta's price check
(ql:quickload :drakma)
(ql:quickload :closure-html)
(ql:quickload :cl-json)
(ql:quickload :hunchentoot)
(defvar *server* nil)
(defun string-clean (str)
@skplunkerin
skplunkerin / init-chromebook.md
Last active November 26, 2016 06:53
chromebook dev setup using crouton recipe
@ngsmrk
ngsmrk / sidekiq_monitoring
Created August 11, 2014 11:51
Sidekiq queue checking via rails console
stats = Sidekiq::Stats.new
stats.queues
stats.enqueued
stats.processed
stats.failed
@mogox
mogox / gist:9143210
Last active March 29, 2016 00:24
Git tips(reminders)

Adding a remote

git remote add upstream https://github.com/otheruser/repo.git

List of remotes

git remote -v
@afeld
afeld / gist:5704079
Last active November 27, 2023 15:43
Using Rails+Bower on Heroku
@egaumer
egaumer / controller.js
Created May 14, 2013 11:20
Elasticsearch/AngularJS Pagination Example
$scope.pager = {
pageChange: function(pageNum) {
$scope.search(resultPager.get(pageNum));
},
next: function() {
this.pageChange(resultPager.next());
},
@henrik
henrik / rules.md
Last active May 23, 2022 12:31
Sandi Metz' four rules from Ruby Rogues episode 87. Listen or read the transcript: http://rubyrogues.com/087-rr-book-clubpractical-object-oriented-design-in-ruby-with-sandi-metz/
  1. Your class can be no longer than 100 lines of code.
  2. Your methods can be no longer than five lines of code.
  3. You can pass no more than four parameters and you can’t just make it one big hash.
  4. When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done. And your view can only know about one instance variable.

You can break these rules if you can talk your pair into agreeing with you.

@rafaelp
rafaelp / find_unused_images.rake
Last active April 18, 2024 11:27
Rake task to find unused images on Rails project to deletion.
# It requires ACK - http://betterthangrep.com/
task :find_unused_images do
images = Dir.glob('app/assets/images/**/*')
images_to_delete = []
images.each do |image|
unless File.directory?(image)
# print "\nChecking #{image}..."
print "."
result = `ack -1 -G '(app|public)' --ruby --html --css --js #{File.basename(image)}`