Skip to content

Instantly share code, notes, and snippets.

@airtonix
airtonix / error
Created March 31, 2014 00:55
Trying to use heroku on Windows 7. Cmder (conemu with msysgit and bash)
zenobius@NOVACRASH:~/Dev/someproject (master)
ⵃ heroku create
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: No such file or directory - git --version (Errno::ENOENT)
Backtrace: C:/Users/zenobius/.heroku/client/lib/heroku/helpers.rb:93:in ``'
C:/Users/zenobius/.heroku/client/lib/heroku/helpers.rb:93:in `has_git?'
C:/Users/zenobius/.heroku/client/lib/heroku/helpers.rb:98:in `git'
@airtonix
airtonix / bash_profile
Last active August 29, 2015 14:01
Dynamic Git Status and Nodejs Path Manipulator
#
# ~/.bash_profile
#
source ~/.bash/prompt-colours/main.sh
source ~/.bash/prompt-prefixes/main.sh
source ~/.bash/prompt-nodejs/main.sh
source ~/.bash/prompt-git/main.sh
{% load i18n %}
{% load staticfiles %}
<!DOCTYPE html>
<!--[if IE 8]> <html class="ie8"> <![endif]-->
<!--[if IE 9]> <html class="ie9 gt-ie8"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="gt-ie8 gt-ie9 not-ie"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="csrf_token" content="{% csrf_token %}">
require [
'lodash'
'angular'
'angular-route'
'angular-route-segment'
], (_, angular) ->
angular.module 'app.common.services.routeResolver', [
'ngRoute',
'route-segment',
angular.module("moduleName", [])
.factory("FactoryName", [
'$http',
function($http) {
// do stuff here
}])
angular.module('subscribeApp', [
'mainCtrl',
]);
angular.bootstrap(document, ["subscribeApp"]);
# /static/js/config.coffee
define [
'lodash'
'angular'
'./locals'
'restangular'
], (_, angular, locals) ->
angular.module 'app.config', [
'restangular'
@airtonix
airtonix / settings.py
Created June 23, 2014 01:40
Django: Dynamic Secret Key Creation
#
# SECRET KEY
# Dynamically create a secret key
#
try:
from settings.secret_key import SECRET_KEY
# on import failure, generate one and create the file
except ImportError as error:
from django.utils.crypto import get_random_string
SECRET_KEY = get_random_string(
UserService:
email: "e@ma.il"
public: false
AppController: ($scope, UserService) ->
$scope.$on "email-updated", (data) ->
UserService.email = data
$scope.$broadcast "email-changed", data