Skip to content

Instantly share code, notes, and snippets.

View halilim's full-sized avatar

Halil Özgür halilim

View GitHub Profile
@vijinho
vijinho / gist:2a59d7660ecc0c7d8c2b
Last active April 10, 2024 03:23
MacOS X nginx SSL Proxy Setup

#Installing nginx on OS X

brew install nginx
sudo cp -v /usr/local/opt/nginx/*.plist /Library/LaunchDaemons/
sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
mkdir -p /usr/local/etc/nginx/logs
mkdir -p /usr/local/etc/nginx/sites-available
mkdir -p /usr/local/etc/nginx/sites-enabled
mkdir -p /usr/local/etc/nginx/conf.d
mkdir -p /usr/local/etc/nginx/ssl
@ericdouglas
ericdouglas / super-tip.txt
Last active February 25, 2024 10:09
Change 4 spaces to 2 spaces indentation and change tab to spaces - Vim tip
// 4 spaces to 2 spaces
%s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g
// Tab to 2 spaces
:%s/\t/ /g
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@myronmarston
myronmarston / output
Created May 10, 2014 07:05
Demonstration of using built in matchers from within a custom matcher
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
Using built in matchers from custom ones
fails when the word does not end with the given letter (FAILED - 1)
fails when the word does not start with the given letter (FAILED - 2)
can match properly
Failures:
# This file extends and overrides parts of the ActiveAdmin DSL and internals
# in order to provide support for automatically displaying and editing images,
# which in our infrastructure are stored as URLs whose column names end in "img".
# Since this file will be reloaded frequently in the development environment,
# all operations done at load time (class_eval's, etc.) MUST be idempotent.
ActiveAdmin::Views::TableFor.class_eval do
def img_column(col_sym=:img, title="Image")
column title, sortable: false do |obj|
@msurguy
msurguy / List.md
Last active April 30, 2024 15:14
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@stereoscott
stereoscott / active_admin_extensions.rb
Created January 12, 2014 00:29
Sample ActiveRecord model that uses paperclip to upload a csv report to s3
module ActiveAdmin
module Reports
module DSL
def enable_reports
action_item only: :index do
link_to("Download", {action: :report, params: params}, {method: :post, data: { confirm: "Are you sure you want to generate this report?"}})
end
collection_action :report, method: :post do
@cjonstrup
cjonstrup / Laravel\app\commands\ViewsCommand.php
Last active August 1, 2019 21:17
Clear Laravel 4.* app/storage/views artisan views:clear
<?php
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class ViewsCommand extends Command {
/**
* The console command name.
*
* @var string
@dakshhmehta
dakshhmehta / laravel-jQuery-validation-rule.php
Last active May 27, 2018 19:13
Convert Laravel validation rules to jQuery validation rules to enable client-side validation. See more information about jQuery validation at http://jqueryvalidation.org/
<?php
use LaravelBook\Ardent\Ardent;
// You can extend Eloquent
// Example: http://laravel.io/bin/89V7
class JsModel extends Ardent {
/**
* Mapping in an array of Laravel Validator class rules
* and jQuery validator rules in format as
@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