Skip to content

Instantly share code, notes, and snippets.

View jpopesculian's full-sized avatar

Julian Popescu jpopesculian

View GitHub Profile
@jpopesculian
jpopesculian / circle.coffee
Last active August 29, 2015 13:56
A simple circle directive for angular google maps
###
!
The MIT License
Copyright (c) 2010-2013 Google, Inc. http://angularjs.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@jpopesculian
jpopesculian / etf.py
Created March 14, 2015 22:14
ETFSpider
from scrapy import Spider, Request
from project.items import ETFItem
class ETFSpider(Spider):
name = "etf"
allowed_domains = ["http://finance.yahoo.com/"]
SETTINGS = {
"url": "http://finance.yahoo.com/etf/lists?mod_id=mediaquotesetf&tab=tab6&scol=nasset&stype=desc&rcnt=100&page=",
"num_pages": 17
}
@jpopesculian
jpopesculian / keybase.md
Created November 21, 2015 21:22
Keybase Proof

Keybase proof

I hereby claim:

  • I am jpopesculian on github.
  • I am jpopesculian (https://keybase.io/jpopesculian) on keybase.
  • I have a public key whose fingerprint is F352 E523 51D1 77AE 862C 27C5 B66E 62C3 1A7B 7846

To claim this, I am signing this object:

@jpopesculian
jpopesculian / addUsersToRooms.js
Created January 5, 2016 19:33
Mongo Shell Script to add users to rooms in Rocket Chat
// Mongo Shell Script
DB_NAME = ""
// HOST = "localhost"
// PORT = "27017"
// db = connect(HOST + ":" + PORT + "/" + DB_NAME)
conn = new Mongo()
db = conn.getDB(DB_NAME)
@jpopesculian
jpopesculian / index.js
Created January 25, 2016 17:39
Some scripts for Stripe and RocketChat diffs
const Stripe = require('stripe')
const MongoClient = require('mongodb').MongoClient
const diff = require('deep-diff').diff
const assert = require('assert')
const STRIPE_KEY = process.env.STRIPE_KEY
const MONGO_URL = process.env.MONGO_URL
MongoClient.connect(MONGO_URL, (err, db) => {
assert.equal(err, null)
@jpopesculian
jpopesculian / prod.sh
Last active February 11, 2016 17:46
Setting up a production environment for rocket chat
# CONFIG PORTS
METEOR_PRIMARY_PORT=3001
METEOR_SECONDARY_PORT=3002
MONGO_PRIMARY_PORT=28001
MONGO_SECONDARY_PORT=28002
MONGO_ARB_PORT=28003
# DOCKER CONTAINER NAMES
MONGO_PRIMARY_NAME="mongo-primary"
MONGO_SECONDARY_NAME="mongo-secondary"
<template name="example">
<button id="button">{{buttonName}}</button>
</template>
@jpopesculian
jpopesculian / jpopesculian.key
Created May 20, 2016 01:07
Keybase Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Keybase OpenPGP v2.0.49
Comment: https://keybase.io/crypto
xsFNBFZQ3yMBEACZaXMiCCpCJMxmJ43r2Gq4CwhJE2qD+UDeoDTqJgWi1o8NjrtT
qLUSHLFcvONJ6ESYSDEbBQmbh9+HuwCq8uat5lbICk4wGeNIFVmn5RGeQVbmtvH0
m3ZDhzmLcL3sHvKx43YrbpPzU/sJryhnq/VzS/Rcmr7G/dZvGmXYx0MTZ6q5AoGl
69/lIrT/v+shnBcj9QHfcQar/ODRTUnLn2lJq4Ty4S11B5UIhfA/FWmMuCNof2Za
ic9ZbQvT2szgwfTHN2HnYjNwzgSEQ5phpzMqesJA8p6AAcRULjEk8/N0CYYLyETH
yAGGLD5gdJWQgkO/+n0DWbREruUWyFxgDMH99uA1/J7zzeJ6dBhKyM4DUTREaaLA
@jpopesculian
jpopesculian / git-umatm
Last active June 16, 2016 15:15
Git utility to update master and test merge
#!/bin/bash
# Add to bashrc to alias as "git sync":
# git() { if [[ $@ == 'sync' ]]; then command git-umatm; else command git "$@"; fi }
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
REMOTE_NAME=${1:-"origin"}
MASTER_BRANCH_NAME=${2:-"master"}
print_header() {
@jpopesculian
jpopesculian / serve-prod
Created November 1, 2016 19:26
Helpful script to get rails app branch up and running in production mode
#!/bin/bash
PORT=8080
DIR=$HOME/Development/single-ops-prod
rm -rf $DIR
git worktree add --detach $DIR
cd $DIR
RAILS_ENV=production