Skip to content

Instantly share code, notes, and snippets.

View tlatsas's full-sized avatar

Tasos Latsas tlatsas

View GitHub Profile
@tlatsas
tlatsas / example.yml
Created July 13, 2021 11:20 — forked from cecilemuller/example.yml
Run Docker Compose + in Github Action
name: Test
on:
push:
branches:
- main
- features/**
- dependabot/**
pull_request:
branches:
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
@tlatsas
tlatsas / bundler-rspec-inline.rb
Created January 22, 2021 21:00 — forked from odlp/bundler-rspec-inline.rb
Inline Bundler and autorun RSpec
require "bundler/inline"
gemfile do
gem "rspec"
end
require "rspec/autorun"
RSpec.describe "inline Bundler and autorun RSpec" do
it "is convenient for self-contained examples & bug repros" do
@tlatsas
tlatsas / Gemfile
Created July 7, 2020 09:47 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@tlatsas
tlatsas / html_safe.md
Created February 12, 2018 10:56 — forked from joekur/html_safe.md
Proper Use of `html_safe`

Proper use of html_safe

Let's look at an innocuous piece of ruby. Consider some view code showing a user's name and phone number:

"#{first_name} #{last_name} #{phone}"

Great - this is very succinct, readable, and can easily be extracted to a method in a

@tlatsas
tlatsas / yardoc_cheatsheet.md
Created February 3, 2017 11:09 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

@tlatsas
tlatsas / 0_reuse_code.js
Created March 29, 2014 10:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#
# weechat.conf -- weechat v0.3.2
#
[debug]
[startup]
command_after_plugins = ""
command_before_plugins = ""
display_logo = on
@tlatsas
tlatsas / _config.yml
Created August 12, 2011 11:30 — forked from edavis10/_config.yml
Pagination in Jekyll
# ....other stuff here
paginate: 10
@tlatsas
tlatsas / xmonad.hs
Created August 2, 2011 15:31 — forked from doitian/xmonad.hs
xmonad.hs
{-# OPTIONS_GHC -fcontext-stack=32 #-}
import XMonad hiding ( (|||) )
import qualified XMonad.StackSet as W
import Control.OldException(catchDyn,try)
import Data.Char (toLower)
import Data.List (intercalate, intersperse, isSuffixOf, isPrefixOf)
import qualified Data.Map as M (fromList)