Skip to content

Instantly share code, notes, and snippets.

View ZaneA's full-sized avatar

Zane Ashby ZaneA

View GitHub Profile
@rtyler
rtyler / pomodoro.rb
Last active September 14, 2022 20:00
Simple pomodoro CLI tool for Linux
#!/usr/bin/env ruby
require 'time'
module Pomodoro
INTERVAL = 25 # minutes
TOTAL_INTERVALS = 4
BREAK_TIME = 5 # minutes
def self.notify(title, body)
system("notify-send -a pomodoro -t 5000 -u critical -i appointment '#{title}' '#{body}'")
@Tocacar
Tocacar / gist:4337861
Created December 19, 2012 16:06
I need to create a custom DataSourceIterator so that I can pass a related collection's properties to the sonata admin bundle's exportAction (I think this is the only way to achieve the export of one-to-many values, I may be wrong). I have traced backwards how my admin class is currently generating a DataSourceIterator (I think) - see below. Pres…
// vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Admin/Admin.php
/**
* @return
*/
public function getDataSourceIterator()
{
$datagrid = $this->getDatagrid();
$datagrid->buildPager();
@leek
leek / _Magento1_DeleteTestData.md
Last active December 29, 2023 09:51
Magento 1 - Delete All Test Data

These set of scripts are for Magento 1. For Magento 2, see this Gist.