Skip to content

Instantly share code, notes, and snippets.

View okeen's full-sized avatar

Eneko Taberna okeen

  • Ruby on Rails & javascript engineer @ etware
  • Santiago Compostela
View GitHub Profile
@franciscoj
franciscoj / pdf_merge.sh
Created March 31, 2011 07:37
Little script to merge some pdf files with Ghostscript command
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf file3.pdf
# -q -dNOPAUSE -dBATCH -> means just quietly and close ghostscript after running
# -sOutputFile=merged.pdf is the merged file
# file1.pdf file2.pdf file3.pdf is the list of files thar are going to be merged.
import Foundation
extension String
{
var length: Int {
get {
return countElements(self)
}
}
@maxivak
maxivak / custom_submit_simple_form.md
Last active February 27, 2023 16:33
Rails simple_form custom submit button. simple_form, bootstrap 3

Custom submit button in simple_form and bootstrap 3

Objective

It is easy to add wrappers for input components in simple_form, but it takes some time to modify rendering of buttons ("f.button").

We want to have this in our form:

= f.button :submit_cancel, 'Save'

#EXTINF:-1,Nickelodeon
http://B29273.cdn.telefonica.com/29273/NICK_SUB.m3u8
#EXTINF:-1,Disney Junior
http://B29285.cdn.telefonica.com/29285/DSNJR_SUB.m3u8
#EXTINF:-1,40TV
http://B31312.cdn.telefonica.com/31312/40TV_SUB.m3u8
#EXTINF:-1,Disney XD
http://B31309.cdn.telefonica.com/31309/DSNYXD_SUB.m3u8
#EXTINF:-1,Canal Cocina
http://B31305.cdn.telefonica.com/31305/COCINA_SUB.m3u8
@ProGM
ProGM / arel_cheatsheet_on_steroids.md
Last active April 19, 2025 11:22
Arel cheatsheet on Steroids

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias