Skip to content

Instantly share code, notes, and snippets.

🚴‍♂️
Focusing

Romans Malinovskis romaninsh

🚴‍♂️
Focusing
Block or report user

Report or block romaninsh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pahud
pahud / create-job.sh
Last active Dec 15, 2019
AWS CLI sample for Elemental MediaConvert create-job actions
View create-job.sh
#!/bin/bash
#
# Usage: bash create-job.sh S3_INPUT_VIDEO_FILE_PATH
# e.g. bash create-job.sh s3://your-s3-bucket/your-input-video.mov
input=$1
basename=$(basename $input)
newbasename="${basename%%.*}-H264-AAC.mp4"
output="$(dirname $input)/$newbasename"
@grihabor
grihabor / Makefile.version
Last active Apr 10, 2020
Makefile to use for incremental semantic versioning
View Makefile.version
MAKE := make --no-print-directory
DESCRIBE := $(shell git describe --match "v*" --always --tags)
DESCRIBE_PARTS := $(subst -, ,$(DESCRIBE))
VERSION_TAG := $(word 1,$(DESCRIBE_PARTS))
COMMITS_SINCE_TAG := $(word 2,$(DESCRIBE_PARTS))
VERSION := $(subst v,,$(VERSION_TAG))
VERSION_PARTS := $(subst ., ,$(VERSION))
View countries.sql
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@kconragan
kconragan / keyrepeat.shell
Last active Jun 3, 2020
Enable key repeat in Apple Lion for Sublime Text in Vim mode
View keyrepeat.shell
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@jimbojsb
jimbojsb / gist:1630790
Created Jan 18, 2012
Code highlighting for Keynote presentations
View gist:1630790

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

View comments.sql
CREATE TABLE `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`comment` text,
`company_id` int(11) DEFAULT NULL,
`status` int(11) DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=53 DEFAULT CHARSET=utf8
View Model_Comment.php
class Model_Comment extends Model_Table{
protected $entity_code='comments';
protected $table_alias='c';
protected function defineFields(){
$this->newField('id')
->datatype('int')
->caption('ID')
->system(true)
;
@mantonuk
mantonuk / gist:800957
Created Jan 28, 2011
Controller_Comment.php
View gist:800957
class Controller_Comment extends Controller{
protected $model_name='Model_Comment';
}
You can’t perform that action at this time.