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
| ;;; pbcopy.el --- Emacs Interface to pbcopy | |
| ;; Copyright (C) 2011 Daniel Nelson, based on xclip.el, by Leo Shidai Liu | |
| ;; This file is free software; you can redistribute it and/or modify | |
| ;; it under the terms of the GNU General Public License as published by | |
| ;; the Free Software Foundation; either version 3, or (at your option) | |
| ;; any later version. | |
| ;; This file is distributed in the hope that it will be useful, |
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
| #!/bin/bash | |
| if [[ "$1" =~ "production" ]]; then | |
| read -a array | |
| pushed_ref=${array[1]} | |
| remote_ref=${array[3]} | |
| echo | |
| echo "# Commits:" | |
| git log --oneline $remote_ref...$pushed_ref |
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
| module ModuleName | |
| include OtherModules | |
| delegate :some_method, to: :some_object | |
| module ClassMethods | |
| def class_method | |
| end | |
| 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
| # | |
| # my solution to ListsAndRecursion-6 of Programming Elixir 1.6 | |
| # | |
| defmodule MyList do | |
| def flatten([]) do | |
| [] | |
| end | |
| def flatten([head | tail]) when is_list(head) do | |
| flatten(head) ++ flatten(tail) |
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 'fileutils' | |
| type_map = { | |
| jpeg: 'Photos', | |
| JPEG: 'Photos', | |
| jpg: 'Photos', | |
| JPG: 'Photos', | |
| png: 'PNGs', | |
| PNG: 'PNGs', | |
| mov: 'Videos', |
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
| .fa-events-icons-failed { | |
| &.icon { | |
| &::before { | |
| display: none; | |
| } | |
| &::after { | |
| @extend .din-bold; | |
| } | |
| } |
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
| Request URL:http://d2l5dw7ow11yzt.cloudfront.net/339/254/0.5-0.5/assets/images/51b24a2054b709630c000024.jpg | |
| Response Headers: | |
| Age: 162 | |
| Cache-Control: public, must-revalidate, max-age=2592000 | |
| Connection: keep-alive | |
| Content-Disposition: inline | |
| Content-Length: 0 | |
| Content-Type: image/jpeg | |
| Date: Fri, 28 Jun 2013 11:28:58 GMT | |
| Server: nginx/1.2.3 + Phusion Passenger 3.0.11 (mod_rails/mod_rack) |
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
| Angular: | |
| dashboard.module.es6 // Defines the DashboardApp | |
| dashboard.controller.es6 | |
| order_queue.module.es6 // Defines the OrderQueueApp | |
| order_queue.controller.es6 | |
| modal.directive.js // A general purpose directive for displaying modals. Modal html is loaded from templates | |
| Angular Templates: | |
| dashboard_order_info_modal.html // Renders order_info_details | |
| order_queue_info_modal.html // Also renders order_info_details |
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
| namespace :assets do | |
| desc 'copy precompiled assets to S3' | |
| task :copy_to_s3 => :environment do | |
| Rails.logger.info('Copying compiled assets to s3...') | |
| s3 = AWS::S3.new | |
| bucket = s3.buckets[APP_CONFIG[:rails_assets_bucket]] | |
| base_dir = Rails.root.join('public', 'assets').to_s + '/' | |
| regexp_extensions = [] | |
| ['js', 'css', 'html', 'png', 'jpg', 'jpeg', 'gif', 'ttf', 'woff', 'svg', 'eot', 'otf'].each do |ext| |
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
| struct order *orders; | |
| // ... | |
| // *orders is assigned to point to a block of memory returned by ALLOC_N (from ruby.h) | |
| // ... | |
| // Data in *orders is fine here | |
| struct winning_order winners[winners_length]; | |
| // Data in *orders is corrupt here (see below) | |
| Subset of data pre and post local declaration of "winners" variable: |
NewerOlder