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
.comment{:class => "c" + nesting.to_s} | |
.profile | |
%img{:src => "/assets/profile_image_sample.jpg"} | |
.message | |
.username | |
- if defined? comment.user.username | |
- if comment.user.username.blank? | |
= comment.user.first_name | |
- else | |
= comment.user.username |
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
//Below is an example of a directive that let's other directives know when there has been a change in a breakpoint, as well as a | |
//windows resize, the event is triggered on the window resize and broadcast to child scopes (for this reason it's best to place | |
//the directive on body or a similar high level element), the arguments contain the new previousBreakpoint will likely return | |
//null if there is yet to be a change in breakpoint. | |
app.directive('viewFrame', [function($scope) { | |
return { | |
controller: function($scope, $element) { | |
var width = function() { | |
return $element.width(); |
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
$('.full_wrap').mousedown(function(e) { | |
// get container co ordinates | |
var tcw= $('.tags_container.stores_only').width(), | |
tch= $('.tags_container.stores_only').height(), | |
tct= $('.tags_container.stores_only').offset().top, | |
tcl= $('.tags_container.stores_only').offset().left; | |
// calculate selectable zone | |
var xCoordsMin = tcl, | |
xCoordsMax = tcl + tcw, |
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 request = require('request'); | |
var cheerio = require('cheerio'); | |
var fs = require('fs'); | |
var readline = require('readline'); | |
var stream = require('stream'); | |
if(process.argv[2] === '-links') { | |
var url = 'https://example.com/just-sold?price_min=0'; | |
var count = 1; |
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
{ | |
"name": "Genifique", | |
"version": "0.0.0", | |
"authors": [ | |
"Will" | |
], | |
"private": true, | |
"ignore": [ | |
"**/.*", | |
"node_modules", |
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 fs = require('fs'); | |
var _ = require('lodash'); | |
var cheerio = require('cheerio'); | |
module.exports = {}; | |
module.exports.build = {}; | |
module.exports.build.template = {}; | |
modulesPath = __dirname + '/../../modules/' |
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
// Converts date object to yyyy-mm-dd | |
var convertDateToString = function(timestamp) { | |
var yyyy = timestamp.getFullYear(); | |
var mm = timestamp.getMonth(); | |
var dd = timestamp.getDate(); | |
if(mm < 10) mm = '0' + mm.toString(); | |
if(dd < 10) dd = '0' + dd.toString(); | |
yyyy = yyyy.toString(); |
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
// takes [x, y] array objects for the points | |
function bezier(t, p0, p1, p2) { | |
const ay = Math.pow(1 - t, 2) * p0[1]; | |
const by = 2 * (1 - t) * t * p1[1]; | |
const cy = Math.pow(t, 2) * p2[1]; | |
const ax = Math.pow(1 - t, 2) * p0[0]; | |
const bx = 2 * (1 - t) * t * p1[0]; | |
const cx = Math.pow(t, 2) * p2[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
# --Helper Functions-- | |
# Finds PIDs using port | |
pidport() { | |
if [ -z $1 ]; | |
then echo "pidport requires <port>"; | |
return 1; | |
fi | |
lsof -n -i:$1 | grep LISTEN | while read line; |
OlderNewer