Skip to content

Instantly share code, notes, and snippets.

View alchaplinsky's full-sized avatar

Alex Chaplinsky alchaplinsky

View GitHub Profile
Warenausgang,SKU,Quantity,Order,Status,Herkunft,Lager,OrderItem.id,Order.typeId
"2021-05-18 15:36:00",ZC-IN,1,483856,7,12,104,1014750,5
"2021-05-18 15:36:00",MASAN,1,483913,7,12,104,1014935,5
"2021-05-18 15:36:00",,1,483913,7,12,104,1014936,5
"2021-05-18 15:36:00",CB24-IN,1,483913,7,12,104,1014937,5
"2021-05-18 15:36:00",,1,483913,7,12,104,1014938,5
"2021-05-18 15:36:00",YBLT-BO,1,483914,7,12,104,1014941,5
"2021-05-18 15:36:00",YM-CO-STRAP,1,483857,7,12,104,1014978,5
"2021-05-18 15:36:00",RC12-NA,1,483925,7,12,104,1014981,5
"2021-05-18 15:36:00",OEKO-PT,1,483979,7,12,104,1015155,5
"Project","Client","Description","Task","User","Email","Tags","Billable","Start Date","Start Time","End Date","End Time","Duration (h)","Duration (decimal)","Billable Rate (COP)","Billable Amount (COP)"
"2020-24 Puentes Variante Lorica_El Condor","","Revisión planos pruebas de carga","","Agonzalez","test@example.com","","Yes","03/09/2020","4:30 PM","03/09/2020","5:30 PM","1:00","1.00","86470.00","86470.00"
"2020-39 Transmilenio Av. 68 Tramo 4_Pavcol","","Reunión","","Aserrano","test1@example.com","","Yes","03/09/2020","4:00 PM","03/09/2020","5:00 PM","1:00","1.00","234942.00","234942.00"
"2018-81 AcompañamientoMar2_CHEC","","Box Culvert "K11+218 UF4","","Dmontoya","test2@example.com","","Yes","03/09/2020","2:00 PM","03/09/2020","6:00 PM","4:00","4.00","67941.00","271764.00"
@alchaplinsky
alchaplinsky / server.js
Last active August 12, 2019 13:08
Sending email with Express and nodemailer
const express = require("express");
const cors = require("cors");
const bodyParser = require("body-parser");
const nodemailer = require("nodemailer");
const app = express();
app.use(cors({ origin: "*" }));
app.use(bodyParser.json());
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
$.fn.extend numMaxlength: (options) ->
@each ->
$this = $(this)
$this.keydown (e) =>
if !(isNumber(e) || isAllowedKey(e)) || ( isMaxLength($this) && isNumber(e) )
e.preventDefault()
isNumber = (event) ->
numberKeys = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105]
numberKeys.indexOf(event.keyCode) != -1
@alchaplinsky
alchaplinsky / gist:1b9dc421fe02eb594f18
Created May 27, 2015 16:25
Capistrano 3 ask secretly
def ask_secretly(key, default=nil)
require "highline"
set key, proc{
hint = default ? " [#{default}]" : ""
answer = HighLine.new.ask("Enter #{key}#{hint}: ") do |q|
q.echo = false
end.to_s
}
end
events {
worker_connections 1024;
multi_accept on;
use epoll;
}
gzip on;
gzip_http_version 1.1;
gzip_comp_level 6;
@alchaplinsky
alchaplinsky / cookie.coffee
Created December 9, 2012 12:22
Cookie management class
@alchaplinsky
alchaplinsky / gist:3684212
Created September 9, 2012 13:12
Clean up expired Active Record sessions
namespace :db do
namespace :sessions do
desc "Clean up expired Active Record sessions (updated before ENV['EXPIRE_AT'], defaults to 1 month ago)."
task :expire => :environment do
Rails.logger.info "Cleaning up expired sessions..."
puts "Cleaning up expired sessions..."
time = ENV['EXPIRE_AT'] || 1.month.ago.to_s(:db)
rows = ActiveRecord::SessionStore::Session.delete_all ["updated_at < ?", time]
Rails.logger.info "Expired sessions cleanup: #{rows} session row(s) deleted."
puts "Expired sessions cleanup: #{rows} session row(s) deleted."
@alchaplinsky
alchaplinsky / example.js
Created July 24, 2012 12:11 — forked from addyosmani/example.js
Mediator pattern
// Example 1
mediator.name = 'Doug';
mediator.subscribe('nameChange', function(arg){
console.log(this.name);
this.name = arg;
console.log(this.name);
});
mediator.publish('nameChange', 'Jorn');