Skip to content

Instantly share code, notes, and snippets.

View eugene-kamenev's full-sized avatar
💚

Eugene Kamenev eugene-kamenev

💚
View GitHub Profile
@timyates
timyates / README.md
Created July 30, 2015 08:14
Generating terminal gifs on OS X the free way

Didn't work any of this out, I just stuck things together that I found on the web

First, install the things:

brew install imagemagick
brew install ffmpeg

Then, I have a small (600px wide) iTerm window with a big font. Load Quicktime, and record screen (just the area of the terminal)

Trim and save the mov somewhere (lets say ~/Documents/term.mov)

@chiquitinxx
chiquitinxx / gist:a38ba0b54a405c11ece4
Created March 1, 2015 17:04
First approach angular controller
//Todo app controller written in groovy, from https://angularjs.org/
def todoAngular = { $scope ->
$scope.todos = [
[text:'learn angular', done: true],
[text:'build an angular app', done: false]
]
$scope.addTodo = {
$scope.todos << [text:$scope.todoText, done:false]
$scope.todoText = ''
@graemerocher
graemerocher / raw-hibernate-vs-gorm-correlated-subqueries.java
Created April 29, 2014 08:49
Raw Hibernate vs GORM for Hibernate Correlated Subqueries
// Raw Hibernate
DetachedCriteria employeeCriteria = DetachedCriteria.forClass(Employee.class);
employeeCriteria.createAlias("region", "region").setFetchMode("region", FetchMode.JOIN);
employeeCriteria.add(forName("region.continent").in("APAC","EMEA"));
employeeCriteria.setProjection(distinct(property("employeeId")));
Criteria salesCriteria = sessionFactory.getCurrentSession().createCriteria(Sale.class)
salesCriteria.add(forName("employeeId").in(employeeCriteria));
salesCriteria.add(Restrictions.gt("total",100000));
salesCriteria.setProjection(distinct(property("employeeId")));
@jaconza
jaconza / word_country_data.sql
Created October 24, 2011 15:21
MySQL script for creation and population of country, city and countryLanguage tables with the most popular cities and countries already inserted.
-- MySQL dump 10.13 Distrib 5.1.51, for pc-linux-gnu (i686)
--
-- Host: 127.0.0.1 Database: world
-- ------------------------------------------------------
-- Server version 5.1.51-debug-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;