Skip to content

Instantly share code, notes, and snippets.

View dan1d's full-sized avatar

Daniel Alejandro Dominguez Diaz dan1d

View GitHub Profile
This file has been truncated, but you can view the full file.
https://new.expensify.com/request/nehttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://new.expensify.com/request/new/descriptionhttps://
@dan1d
dan1d / current-dir-in-iterm-tab-title.sh
Created October 22, 2018 20:16
Set the iTerm tab title to the current directory, not full path for ZSH OR BASH
# add tab name to iterm using zsh( reference: https://github.com/robbyrussell/oh-my-zsh/issues/5700 )
# put this in your .zshrc file.
DISABLE_AUTO_TITLE="true"
function precmd () {
window_title="\033]0;${PWD##*/}\007"
echo -ne "$window_title"
}
user_id: 2493 - Date: 2017-06-05 - ReportID: 406241
<SalesReceipt>
<TxnDate>2017-06-05</TxnDate>
<Line>
<Description>APPETIZERS, BEVERAGES, Baked Potato, CORN, DAILY SPECIALS, FEMALE CRABS, KIDS MEALS, MALE CRABS, MERCHANDISE, Other Items/Fees, PASTA, PLATTERS, RAW BAR, Refunds (sales), SALADS, SANDWICHES, SHIPPING, SHRIMP, SNACKS, SOUPS, TACO, Taxes (net refunds), WRAPS</Description>
<Amount>2498.65</Amount>
<DetailType>SalesItemLineDetail</DetailType>
<SalesItemLineDetail>
<ItemRef name="Food">11</ItemRef>
<UnitPrice>0.0</UnitPrice>
user_id: 2493 - Date: 2017-06-05 - ReportID: 406241
<SalesReceipt>
<TxnDate>2017-06-05</TxnDate>
<Line>
<Description>APPETIZERS, BEVERAGES, Baked Potato, CORN, DAILY SPECIALS, FEMALE CRABS, KIDS MEALS, MALE CRABS, MERCHANDISE, Other Items/Fees, PASTA, PLATTERS, RAW BAR, Refunds (sales), SALADS, SANDWICHES, SHIPPING, SHRIMP, SNACKS, SOUPS, TACO, Taxes (net refunds), WRAPS</Description>
<Amount>2498.65</Amount>
<DetailType>SalesItemLineDetail</DetailType>
<SalesItemLineDetail>
<ItemRef name="Food">11</ItemRef>
<UnitPrice>0.0</UnitPrice>
Remote Address:127.0.0.1:3000
Request URL:http://localhost:3000/api/v1/config
Request Method:GET
Status Code:304 Not Modified
Response Headers
view source
Cache-Control:max-age=0, private, must-revalidate
Connection:close
ETag:"34f0bc1f8f76a1c0e7855ed2c0965b5b"
Server:thin 1.6.2 codename Doc Brown
@dan1d
dan1d / gist:6224742
Created August 13, 2013 19:24
Differences
// File restaurant_users.js en Staging
$scope.edit = function(user){
$scope.user = $scope.data.users[$scope.data.users.indexOf(user)];
$scope.panelTitle = 'Edit User';
$scope.showPanel();
editFlag = true;
};
// commit https://bitbucket.org/setforservice/sfs-front-end/commits/53143b3de4453c74691a0828768c615de584689a
ActiveAdmin.register Article do
filter :site
index do
column ("Site") { |article| article.site.name }
column ("Author"), sortable: :author do |article|
article.author
end
column ("Title"), sortable: :title do |article|
= form_tag '/user_favorites', class: 'hidden' do
= hidden_field_tag :freelancer_id, freelancer.id
= submit_tag t('freelancer.search.result.mark_favorite')
gem 'jquery-fileupload-rails', '0.4.1'
# Formulario
listen_for_file_uploads = ->
$("#form-fileupload").fileupload
dataType: "json"
dropZone: $('#dropzone') # Div del dropzone
add: (e,data) ->
data.context = $('#hide_ajax_preloader').fadeIn() # Carga una gif hasta que termine el upload
@dan1d
dan1d / gist:5685026
Created May 31, 2013 13:37
ActiveRecord without rails.
require "active_record"
require "sqlite3"
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => 'ejemplo',
:host => 'localhost')
ActiveRecord::Schema.define(:version => 0) do