Skip to content

Instantly share code, notes, and snippets.

View siegy22's full-sized avatar
:shipit:

Yves Siegrist siegy22

:shipit:
View GitHub Profile
class MyAwesomeRake
class Task
attr_reader :dependencies, :description, :block
def initialize(description, dependencies = [], &block)
@dependencies = dependencies
@description = description
@block = block
1: git log -S auto_explain_threshold_in_seconds --reverse
2: git log -1 0306f82e0c3cda3aad1b45eb0c3a359c254b62cc --format=fuller
3: git tag --contains 0306f82e0c3cda3aad1b45eb0c3a359c254b62cc -l | grep 'v' | head -n 1
4: git tag --contains d3688e0 -l | grep 'v' | head -n 1
5: activerecord/lib/active_record/explain.rb
6: git log --pretty=format:%an --follow activerecord/lib/active_record/explain.rb | sort | uniq
7: 'We discussed that the auto explain feature is rarely used.
This PR removes only the automatic explain. You can still display
the explain output for any given relation using `ActiveRecord::Relation#explain`.
require 'nintendo'
class Pingu < Nintendo::Character
def roll
move(:shield, :stick_left)
end
def attack
move(:stick_down, :attack)
end

EAir16 Bot

A little ruby bot to win Energy Air 2016 Tickets.

Dependencies

  • ruby (preffered 2.2.2)
  • poltergeist
  • capybara
@siegy22
siegy22 / install_redis.rb
Last active August 26, 2016 07:04
Install redis from ruby code
def which(cmd)
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
exts.each do |ext|
exe = File.join(path, "#{cmd}#{ext}")
return exe if File.executable?(exe) && !File.directory?(exe)
end
end
nil
end
$(document).on("turbolinks:load", function(){
var availableTimesPath = "<%= Rails.application.routes.url_helpers.pastor_me_available_times_path %>";
$('#calendar').fullCalendar({
selectable: true,
selectHelper: true,
header: {
left: 'prev,next',
center: 'title',
right: 'month,agendaWeek'
},
@siegy22
siegy22 / dbcreate.py
Last active February 7, 2017 11:19
django management task to create the database
import os
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
help = "Creates your database using psql command"
def add_arguments(self, parser):
parser.add_argument(
'-R', '--router', action='store', dest='router', default='default',
@siegy22
siegy22 / dbdrop.py
Last active February 7, 2017 11:19
import os
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
help = "Drops your database using psql command"
def add_arguments(self, parser):
parser.add_argument(
'-R', '--router', action='store', dest='router', default='default',
Unstaged
modified README.md
@@ -2,7 +2,12 @@
[![Build Status](https://travis-ci.org/bierik/plone-vuejs.svg?branch=master)](https://travis-ci.org/bierik/plone-vuejs)
-> A simple [Vue.js](https://vuejs.org/) SDK to build web sites easily on top of the [Plone RESTAPI](https://github.com/plone/plone.restapi).
+> A simple [Vue.js](https://vuejs.org/) SDK to build web sites easily on top of the [plone.restapi](https://github.com/plone/plone.restapi).
+
+### Prerequests
### Example
# okra = Okra.enter
# okra.order('poulet', nan: true, pakora: false)
#
# chainable:
# Okra.enter.order('poulet').order('fish', pakora: true)
###
class Okra
# Raj's sick today Damayanti's here for the rescue