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
year = /(?<year>(20)?(07|08|09|10|11|12|13))/ | |
month = /(?<month>0[1-9]|1[012])/ | |
day = /(?<day>0[1-9]|\.[1-9]|[12][0-9]|3[01])/ | |
NUMERAL_DATE_REGEX = /#{year}(?<separator>\.|\-|\/|_)?#{month}(\k<separator>)?#{day}/ | |
NUMERAL_DATE_FORMAT = '[%y.%m.%d]' | |
# ... | |
def parse_numeral_date | |
if match = NUMERAL_DATE_REGEX.match(file_name) |
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 'formula' | |
class Libstemmer < Formula | |
# upstream is constantly changing the tarball, | |
# so doing checksum verification here would require | |
# constant, rapid updates to this formula. | |
head 'http://snowball.tartarus.org/dist/libstemmer_c.tgz' | |
homepage 'http://snowball.tartarus.org/' | |
end |
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 'rspec' | |
class Array | |
def custom_group_by(&block) | |
results = {} | |
each do |e| | |
(results[block.call(e)] ||= []) << e | |
end |
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
# **Quickly Host a Git Repository** | |
REPO_ROOT='~/source/repos' # Can be anywhere | |
GIT_PROJECT_PATH='~/projects/my_cool_git_project' # Your local project using git | |
GIT_PROJECT_NAME=$(basename $GIT_PROJECT) | |
mkdir -p $REPO_ROOT | |
cd $REPO_ROOT | |
git clone --bare $GIT_PROJECT_PATH | |
cd $GIT_PROJECT_NAME.git |
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
class Person | |
# extend and include go first | |
extend SomeModule | |
include AnotherModule | |
# constants are next | |
SOME_CONSTANT = 20 | |
# afterwards we have attribute macros | |
attr_reader :name |
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
2013-02-12T06:24:41Z 32462 TID-efyw0 AlbumArchiver JID-c3214393a6220b454bd095a9 INFO: start | |
/u/apps/example.com/releases/20130212062332/app/models/archive.rb:20: [BUG] Segmentation fault | |
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0033 p:---- s:0124 b:0124 l:000123 d:000123 CFUNC :open | |
c:0032 p:0182 s:0119 b:0119 l:0018d8 d:0018d8 METHOD /u/apps/example.com/releases/20130212062332/app/models/archive.rb:20 | |
c:0031 p:0113 s:0114 b:0114 l:000113 d:000113 METHOD /u/apps/example.com/releases/20130212062332/app/workers/album_archiver.rb:14 | |
c:0030 p:0025 s:0107 b:0107 l:000e30 d:000106 BLOCK /u/apps/example.com/shared/bundle/ruby/1.9.1/gems/sidekiq-2.7.2/lib/sidekiq/processor.rb:45 | |
c:0029 p:---- s:0105 b:0105 l:000104 d:000104 FINISH |
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
(function randomAvatar() { | |
var userPoints = parseInt($('#user-points-value').text().replace(',', '')); | |
var avatars = []; | |
$.each(AvatarOverlay.avatarSets[0], function(i, value) { | |
if (value.required <= userPoints) { | |
avatars = avatars.concat(value.avatars); | |
}; | |
}); |
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
<?php | |
/* | |
* jQuery File Upload Plugin PHP Class 6.1 | |
* https://github.com/blueimp/jQuery-File-Upload | |
* | |
* Copyright 2010, Sebastian Tschan | |
* https://blueimp.net | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/MIT |
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
// While you can edit this file, it's best to put your changes in | |
// "User/Preferences.sublime-settings", which overrides the settings in here. | |
// | |
// Settings may also be placed in file type specific options files, for | |
// example, in Packages/Python/Python.sublime-settings for python files. | |
{ | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
// Note that the font_face and font_size are overriden in the platform |
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
--- | |
libmpcodecs/vf_lavc.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/libmpcodecs/vf_lavc.c b/libmpcodecs/vf_lavc.c | |
index b2c1dd7..0ce98c0 100644 | |
--- a/libmpcodecs/vf_lavc.c | |
+++ b/libmpcodecs/vf_lavc.c | |
@@ -76,7 +76,7 @@ static int config(struct vf_instance *vf, | |
return 0; |