Skip to content

Instantly share code, notes, and snippets.

@adilwali
adilwali / backup-github.sh
Last active September 18, 2015 18:39 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account
GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments)
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
GHBU_API=${GHBU_API-"https://api.github.com"} # base URI for the GitHub API
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see comments)
# I recommend using an API token so it is easily trackable and removable.
# Note that you MUST have SSH keys for a user with the access to all repos set up
=begin
Need to install gems heroku, newrelic_rpm
$ gem install heroku newrelic_rpm
Set your apps setting
app_name : heroku's app_name of auto scaling
license_key : NewRelic api key. You can get heroku's NewRelic admin console. "App setting" and "Agent configuration"
execute with cron every minutes
$ ruby ./adjust_dynos_with_newrelic.rb
resourceTypes:
- collection:
usage: This resourceType should be used for any collection of items.
description: The collection of <<resourcePathName>>
get:
description: Get all <<resourcePathName>>
responses:
200:
body:
schema: <<resourcePathName>>
angular.module('project', ['projectServices'])
.config ($routeProvider) ->
$routeProvider
.when('/login',
templateUrl: 'partials/login.html',
controller: LoginCtrl)
.when('/assignments',
templateUrl: 'partials/assignments.html',
controller: AssignmentListCtrl)
.otherwise(redirectTo: '/login')
@adilwali
adilwali / Gruntfile[Angular-seed].js
Last active December 14, 2015 02:29
Basic Gruntfile for an Angular application. (Using Angular seed as the starting point for our project). Core dependencies: "grunt": "~0.4.0", "grunt-contrib-jshint": "0.1.1rc6", "grunt-contrib-nodeunit": "~0.1.2", "grunt-haml": "~0.3.1", "grunt-contrib-jade": "~0.4.0", "grunt-regarde": "~0.1.1", "grunt-contrib-copy": "~0.4.0" }
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
jade: {
files: ['app/**/*.jade'],
tasks: ['jade:compile']
},
haml: {
files: ['app/**/*.haml'],
var system = require('system');
if (system.args.length < 5) {
console.info("You need to pass in account name, username, password, and path to casperJS as arguments to this code.");
phantom.exit();
}
var account = system.args[1];
var username = system.args[2];
var password = system.args[3];
@adilwali
adilwali / index.html
Created February 3, 2013 04:29 — forked from psyho/index.html
<!DOCTYPE HTML>
<html xmlns:ng="http://angularjs.org">
<head>
<title>Inline Edit</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js" type="text/javascript"></script>
<script src="http://code.angularjs.org/0.9.18/angular-0.9.18.min.js" type="text/javascript" ng:autobind></script>
<style type="text/css">
.dirty {