Skip to content

Instantly share code, notes, and snippets.

View khriztianmoreno's full-sized avatar
👨‍💻
Frontend Developer

Khriztian Moreno khriztianmoreno

👨‍💻
Frontend Developer
View GitHub Profile
@khriztianmoreno
khriztianmoreno / Journal.Controller.js
Last active June 23, 2017 16:03
Export to PDF, MEAN Stack
angular.module('SkytechApp')
.controller('JournalsListController',
['$scope', '$state', 'journalsService',
function ($scope, $state, journalsService) {
$scope.refresh = function () {
$scope.myPromise = journalsService.list()
.then(function (data) {
$scope.journals = data;
});
@khriztianmoreno
khriztianmoreno / controller.js
Last active June 6, 2016 15:49
Export to PDF, MEAN Stack
$http({
url: '/api/v1/reports/age-gender',
method: 'GET',
responseType: 'arraybuffer'
})
.success(function (data, status) {
var file = new Blob([data], {
type: 'application/pdf'
});
var fileURL = URL.createObjectURL(file);
@khriztianmoreno
khriztianmoreno / onename
Last active June 23, 2017 16:02
Verifying that khriztianmoreno is my blockchain ID
Verifying that +khriztianmoreno is my blockchain ID. https://onename.com/khriztianmoreno
@khriztianmoreno
khriztianmoreno / job_offerings.md
Created August 15, 2016 17:09 — forked from anonymous/job_offerings.md
How to post job offerings

Write here the Company Name

TechStack

  • write here the
  • techs needed
  • don't forget softskills

Salary: Write here salary (if available)

Full Description

@khriztianmoreno
khriztianmoreno / iterm.md
Last active June 24, 2017 02:37
Working effectively with iTerm2

I have been using iTerm in daily work for almost a year now. Along the way, I learned a few handy settings tweaks and shortcut keys to boost my productivity in command-line environment.

Install iTerm2 If you haven’t heard of iTerm, it’s a popular open source alternative to Mac OS X Terminal. Give it a try, download and install it from http://www.iterm2.com.

Fine-Tune Settings Launch iTerm, open iTerm > Preferences or just Cmd + ,.

Open tab/pane with current working directory

@khriztianmoreno
khriztianmoreno / gist_api.md
Last active June 24, 2017 14:58
A gist for a user with token api call via postman

Gist from API

Is a mobile application made with React Native for making different types of reviews to vehicles. This project was started using the React Native Starter Kit as project base.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae. Sed dui lorem, adipiscing in adipiscing et, interdum nec metus. Mauris ultricies, justo eu convallis placerat, felis enim ornare nisi, vitae mattis nulla ante id dui.

@khriztianmoreno
khriztianmoreno / tricks.md
Last active July 2, 2017 16:45
Operaciones con Git
#############################################
# Push de la rama actual
git push origin $rama_actual

#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1

#############################################
@khriztianmoreno
khriztianmoreno / middlePoint.js
Created September 4, 2017 15:33
Midpoint between two geographical points
//-- Define middle point function
const middlePoint = (lat1, lng1, lat2, lng2) => {
//-- Define radius function
if (typeof (Number.prototype.toRad) === "undefined") {
Number.prototype.toRad = function () {
return this * Math.PI / 180;
}
}
//-- Define degrees function
@khriztianmoreno
khriztianmoreno / distanceBetween.js
Created September 4, 2017 15:47
Distance between two geographical points
/**
* Source http://www.movable-type.co.uk/scripts/latlong.html
*/
const distanceBetween = (lat2, lat1, lng2, lng1) => {
Number.prototype.toRad = function() {
return this * Math.PI / 180;
};
// Haversine Formula
const x1 = lat2-lat1;
const dLat = x1.toRad();
@khriztianmoreno
khriztianmoreno / GIF-Screencast-OSX.md
Created September 8, 2017 17:00 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: