This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
co = checkout | |
a = add | |
s = show | |
st = status | |
d = diff | |
ds = diff --staged | |
ci = commit | |
br = branch | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Based on: https://gist.github.com/871284e41058014863e0 | |
MAGENTA="\033[1;31m" | |
ORANGE="\033[1;33m" | |
GREEN="\033[1;32m" | |
PURPLE="\033[1;35m" | |
WHITE="\033[1;37m" | |
BOLD="" | |
RESET="\033[m" | |
parse_git_dirty () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for filename in *@2x*; do mv "$filename" "${filename//@2x/_2x}"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Why I get stack level too deep in IRB, when calling: | |
# location = VendorLocation.find 53575 | |
# LocationCalendarDayHours.from_java_json(location.calendarHours).first.weekday_type_code | |
# | |
# Note: I created weekday_type.rb as a WwConstant | |
class LocationCalendarDayHours | |
include ActiveModel::Model | |
include WWLegacyJavaJsonSupport |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Americo Savinon | |
email = [email protected] | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
[alias] | |
visual = gitk | |
[core] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Return a json string of related videos for JW Player playlist | |
def get_related_videos_for_jwplayer | |
related = self.related_clips | |
result = [] | |
#Self Clip | |
result << { | |
"file" => self.rate_limited_url, | |
"image" => self["thumb_url"], | |
"title" => self["title"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT distinct(video_clips.id), video_clips.filename, video_clips.title, | |
video_clips.video_id, video_clips.thumb_file_name, video_clips.stands_alone, | |
video_clips.is_thumbset_hosted, video_clips.headline, categories_videos.video_id, | |
categories_videos.category_id, videos.is_live, videos.is_ugc, videos.is_private, | |
videos.live_date FROM `video_clips` INNER JOIN `videos` ON `videos`.`id` = `video_clips`.`video_id` INNER JOIN `categories_videos` ON `categories_videos`.`video_id` = `videos`.`id` INNER JOIN `categories` ON `categories`.`id` = `categories_videos`.`category_id` WHERE (videos.is_live = 1 AND | |
videos.is_ugc = 0 AND | |
videos.is_private = 0 AND | |
(videos.is_deleted IS NULL OR videos.is_deleted = 0) AND | |
categories_videos.category_id IN (111,112,113,114,115,116,117,118,119,120,121,122,123,124,125)) ORDER BY video_clips.stands_alone DESC, videos.live_date DESC LIMIT 15 OFFSET 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var flashVars = { | |
key: "MonkeySee", | |
id: "k_msilton_kraft_snack_9-12-11_008_012", | |
title: "Cheese Snacks - Ice Cream Cone", | |
addConn: "FOODANDDRINK", | |
categories: "Low-Carb,Food & Drink", | |
companionId: "ad300x250", | |
context:{ | |
title: "Cheese Snacks - Ice Cream Cone" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for @video, :url => {:action => (@video.new_record? ? 'name_video' : 'update'), | |
:id => (@video.new_record? ? nil : @video)} do |f| %> | |
<div id='columnForm'> | |
<fieldset> | |
<legend> | |
Video Information | |
</legend> | |
<label for="source_code">Video Source: | |
<%= f.collection_select('video_source_id', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'youtube_it' | |
USER = "YOUTUBE_USER_NAME" | |
PASS = "YOUTUBE_PASS" | |
DEV_KEY = "YOUTUBE_DEV_KEY" | |
##Upload a video | |
uploader = YouTubeIt::Upload::VideoUpload.new( | |
:username => USER, | |
:password => PASS, |