Skip to content

Instantly share code, notes, and snippets.

View TheKidCoder's full-sized avatar
💚
Come Join Us @ Dutchie!

Chris Ostrowski TheKidCoder

💚
Come Join Us @ Dutchie!
View GitHub Profile
@rikkipitt
rikkipitt / expression_validator.rb
Created June 9, 2015 15:15
Dentaku expression validator
class ExpressionValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
begin
Dentaku(value)
rescue Exception => e
record.errors[attribute] << (options[:message] || e.message)
end
end
end
@noelrocha
noelrocha / open_app.html
Created March 16, 2015 18:28
Open app on Google Play or AppStore
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Open App</title>
<!--
URL Params:
customSchemeURL: Your custom scheme app
@gbuesing
gbuesing / ml-ruby.md
Last active December 3, 2024 08:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 11, 2025 17:09
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@iqbalhasnan
iqbalhasnan / carrierwave.rb
Last active May 25, 2023 06:06
carrierwave mini_magick image processing - quality, strip, exif rotation, gaussian blur, interlace
#config/initializers/carrierwave.rb
module CarrierWave
module MiniMagick
# Rotates the image based on the EXIF Orientation
def exif_rotation
manipulate! do |img|
img.auto_orient
img = yield(img) if block_given?
img
end
@plentz
plentz / nginx.conf
Last active April 24, 2025 04:39
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@steveclarke
steveclarke / seventemplate.rb
Last active December 15, 2015 15:19
generator for default Rails project
gem 'thin'
gem 'sevenhelpers', git: 'https://github.com/sevenview/sevenhelpers.git'
#gem_group :assets do
# gem 'zurb-foundation', '~>4.0.0'
#end
gem_group :test, :development, :staging do
gem 'factory_girl_rails', '~> 4.2'
gem 'ffaker'
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 20, 2025 21:14
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

function whichTransitionEvent(){
var t;
var el = document.createElement('fakeelement');
var transitions = {
'transition':'transitionend',
'MSTransition':'msTransitionEnd',
'MozTransition':'transitionend',
'WebkitTransition':'webkitTransitionEnd'
}