Skip to content

Instantly share code, notes, and snippets.

View halilim's full-sized avatar

Halil Özgür halilim

View GitHub Profile
@jaymiejones86
jaymiejones86 / rails_website_launch_checklist.md
Last active January 18, 2021 17:51
Rails Website Launch Checklist

Ruby on Rails Website Launch Checklist

Copy this gist and customise it to your liking.

  • Run Brakeman and resolve any issues where required
  • Run rails best practices and resolve any warnings
  • Run full test suite and make sure all tests are passing
  • Make sure no dummy email addresses are left in any notification emails (eg contact form)
  • Make sure production assets compile correct (eg files in vendor, etc, compile and are not 404'ing in production environment)
  • If using unicorn in production, make sure deploys are restarting the unicorns
@asilbalaban
asilbalaban / ubuntu-php-dev-env.md
Last active August 26, 2022 23:35
Ubuntu 12.04 LTS 64bit sürümü ile PHP Geliştirme Ortamı Kurulum Rehberi Bu gist php geliştirme ortamı kurulum rehberidir.Temiz bir Ubuntu 12.04 LTS 64bit kurulumundan sonra işlemler bu işlemler yapılmış ve herhangi bir sorunla karşılaşılmamıştır.

Ubuntu 12.04 LTS 64bit sürümü ile PHP Geliştirme Ortamı Kurulum Rehberi

Bu gist php geliştirme ortamı kurulum rehberidir. Temiz bir Ubuntu 12.04 LTS 64bit kurulumundan sonra işlemler bu işlemler yapılmış ve herhangi bir sorunla karşılaşılmamıştır.

@stereoscott
stereoscott / active_admin.rb
Last active March 15, 2020 10:47
Stream CSV exports in ActiveAdmin in Rails 4
# if you want to monkey patch every controller, put this in initializers/active_admin.rb
ActiveAdmin::ResourceController.class_eval do
include ActiveAdmin::CSVStream
end
@mameier
mameier / deploy.rb
Created July 18, 2013 10:40
capistrano hack to procompile locally
desc "deploy precompiled assets"
task :sync_assets, :roles => :app do
run_locally 'mv public/no_assets public/assets || true'
run_locally 'if [ `find app/assets lib/assets vendor/assets -type f -newer public/assets | wc -l` -gt 0 ] ; then bundle exec rake assets:precompile ; fi'
servers = find_servers_for_task(current_task)
servers.each do |server|
run_locally "rsync -va --delete public/assets/ #{user}@#{server}:#{release_path}/public/assets/"
end
run_locally 'mv public/assets public/no_assets || true'
end
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active April 1, 2025 08:06
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@gaganawhad
gaganawhad / i18n conventions.md
Last active July 24, 2023 19:11
Moved to obsidian. Some conventions / guidelines / best practices that helped me while working on internationalization of a rails app.

Internationalization of a Rails App : conventions / guidelines / best practices

I have worked, and am currently working on internationalization of a Rails app. The apps require translating the ActiveRecord models. I have done some googling, but haven't really found any best practices / conventions / guidelines on how to think through this and what guidelines to follow.

I decided to create this document, to give myself a start and have it possibly help others. I am not an expert at any of this, and there may be things I am thinking incorrectly, but having it documented makes it easier to see the flaws and improve upon. If you have some ideas on additions, or think that somethings should change, get in touch.

Note: I use Globalize for model translations

  • I18n.locale controls the app wide locale. It refers to the particular localization version of the app. It defines how the app is localized to the user. It's scope is somewhat larger than the language/tran
@ngocphamm
ngocphamm / Homebrew Zsh on Mac
Last active May 20, 2025 13:42
Notes on using Homebrew Zsh as default login shell
1. Install Zsh with Homebrew
brew install zsh
2. Add "/usr/local/bin/zsh" to "/etc/shells" file
sudo vim /etc/shells
3. Change to default login shell
chsh -s /usr/local/bin/zsh $USER
4. Make sure new version of Zsh is in active
@ck-on
ck-on / ocp.php
Last active July 24, 2025 05:10
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@nike-17
nike-17 / gist:4173162
Created November 30, 2012 01:33
LinkedIn Endorse all
//if you need to andorse all in linkedin just go in to your profil and enter in browser console
setInterval(function(){document.getElementsByClassName('endorse-all-btn')[0].click()}, 5000)
//an leave your tab for some time
@andkerosine
andkerosine / raskell.rb
Created August 15, 2012 05:56
Haskell-like list comprehensions in Ruby
$stack, $draws = [], {}
def method_missing *args
return if args[0][/^to_/]
$stack << args.map { |a| a or $stack.pop }
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :<
end
class Array
def +@