- install cheatset:
sudo gem install cheatset --no-ri --no-rdoc
- compile file:
cheatset generate telex.rb
This file contains 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
// The wrapper function | |
module.exports = function(grunt) { | |
var SRC_CSS = 'app/css/'; | |
var SRC_CSS_ADMIN = 'app/css/admin/'; | |
var SRC_CSS_LANDING = 'app/css/landing/'; | |
var SRC_JS = 'app/js/'; | |
var SRC_JS_ADMIN = 'app/js/admin/'; | |
var SRC_JS_LANDING = 'app/js/landing/'; | |
var BUILD_CSS = 'web/css/'; |
This file contains 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
# on the server: server.coffee | |
Metrics = (name, aggregationQuery, collection, interval) -> | |
@name = name | |
@aggregationQuery = aggregationQuery | |
@collection = collection | |
@interval = interval or 1000*10 | |
@_collectionName = 'metrics-transport' | |
Metrics.prototype._getCollectionName = -> "metrics-#{@name}" |
This file contains 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
BEGIN; | |
INSERT INTO warehouse.rental_transport_routes | |
(ride_no, sequence_no, driver_emp_id, ride_date, from_latitude, from_longitude, to_latitude, to_longitude, ride_type, distance, route_time) | |
VALUES | |
(2,1,TEST_V0002,date '2016-01-22',50.7401640000,3.3271730000,50.8614460000,3.4276280000,'actual',25928,1447 ) , | |
(2,2,TEST_V0002,date '2016-01-22',50.8614460000,3.4276280000,50.6102640000,5.5416590000,'actual',179618,6378 ) , | |
(2,3,TEST_V0002,date '2016-01-22',50.6102640000,5.5416590000,50.7401640000,3.3271730000,'actual',196438,6996 ) , | |
(2,1,TEST_V0002,date '2016-01-22',50.7401640000,3.3271730000,50.8599400000,3.4272200000,'Simul 1',26214,1484 ) , | |
(2,2,TEST_V0002,date '2016-01-22',50.8599400000,3.4272200000,50.7401640000,3.3271730000,'Simul 1',26882,1471 ) , | |
(2,3,TEST_V0002,date '2016-01-22',50.8614460000,3.4276280000,50.8614460000,3.4276280000,'Simul 1',0,0 ) , |
This file contains 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
postRoutes.route '/api/process-payment', (params, req, res, next) -> | |
res.statusCode = 404 | |
res.setHeader 'Content-Type', 'application/x-www-form-urlencoded' | |
paymentId = req.body.id | |
console.log "====== MOLLIE BODY ======" | |
console.log req.body, params | |
console.log "====== MOLLIE BODY ======" | |
mollieApiKey = Meteor.settings.mollie.apiKey | |
mollie = new Mollie.API.Client | |
mollie.setApiKey mollieApiKey |
This file contains 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 socket = io(); | |
var app = feathers(); | |
app.configure(feathers.socketio(socket)); | |
var taskService = app.service('tasks'); | |
Vue.component('app-segment', { | |
template: '#segment-template', | |
props: ['task'], | |
methods: { |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
const _ = require('lodash') | |
const fs = require('fs') | |
const json2csv = require('json2csv') | |
const emails = [ | |
"[email protected]" | |
] | |
const mappedMails = _.compact(_.map(emails, email => { | |
const firstName = _.capitalize(email.split('.')[0]) | |
if (firstName.indexOf('@') < 0) { |
This file contains 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
const errors = require('feathers-errors'); | |
const PDFDocument = require('pdfkit'); | |
const bwipjs = require('bwip-js'); | |
/* eslint-disable no-unused-vars */ | |
class Service { | |
constructor (options) { | |
this.options = options || {}; | |
} |
This file contains 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
// Initialize our service with any options it requires | |
app.use('/tickets', createService(options), (req, res) => { | |
const doc = res.data; | |
doc.pipe(res); | |
return res.format({ 'application/pdf': () => doc.end() }); | |
}); |
OlderNewer