Skip to content

Instantly share code, notes, and snippets.

@nioq
nioq / list-bitbucket-repositories.sh
Created May 29, 2020 07:54
Generate a CSV list of all Bitbucket repositories you have access to. From https://github.com/Tinkertanker/bitbucket-github-migration
#!/bin/bash
read -p 'Bitbucket Username (not email): ' BB_USERNAME
read -sp 'Bitbucket Password: ' BB_PASSWORD
next_url="https://api.bitbucket.org/2.0/repositories?role=member"
while [ ! -z "$next_url" ]; do
response_json=$( curl -s --user $BB_USERNAME:$BB_PASSWORD "$next_url" )
echo "$response_json" | jq -r '.values | map([.slug, .workspace.slug, .description, .is_private] | @csv) | join("\n")'
next_url=$( echo "$response_json" | jq -r '.next' )
@leosoto
leosoto / bb2gh.sh
Created April 2, 2018 13:49
Moves all your organization's bitbucket repositories to GitHub. Note that when a repository is correctly uploaded to GitHub it is *removed* from BitBucket. Requires https://bitbucket.org/zhemao/bitbucket-cli/. Set the variables BB_* with your bitbucket credentials and GH_* variables with your GitHub credentials.
#!/bin/bash
set -e
repos=$(bb list -u $BB_USERNAME -p $BB_PASSWORD --private | grep $BB_ORG | cut -d' ' -f3 | cut -d'/' -f2)
for repo in $repos; do
echo
echo "* Processing $repo..."
echo
git clone --bare git@bitbucket.org:$BB_ORG/$repo.git
cd $repo.git
echo
@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active April 10, 2022 15:47
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@msimpson
msimpson / scroll-test.html
Last active November 17, 2020 10:09
Mac OSX Inertial Scrolling Buffer (http://jsfiddle.net/n7bk6pb9/1/)
<!doctype html>
<html>
<head>
<title>Scroll Test</title>
<style>
html, body {
overflow: hidden;
width: 100%;
height: 100%;
@yannickcr
yannickcr / Readme.md
Created September 5, 2014 11:29
jQuery 1.9.1 + Browserify

jQuery 1.9.1 + Browserify

Install jQuery 1.9.1 and Browserify-shim

npm install jquery@1.9.1 --save
npm install browserify-shim --save-dev

Add the following entries in your package.json

@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active May 1, 2024 23:17
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@christiangenco
christiangenco / download website assets
Created January 20, 2014 23:23
Use wget to download a website's assets, including images, css, javascript, and html. From http://www.linuxjournal.com/content/downloading-entire-web-site-wget
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
<?php
if(!r::is_ajax()) notFound();
header('Content-type: application/json; charset=utf-8');
$data = $pages->find('blog')->children()->visible()->paginate(10);
$json = array();