Skip to content

Instantly share code, notes, and snippets.

View codebycliff's full-sized avatar

Cliff Braton codebycliff

View GitHub Profile
@codebycliff
codebycliff / cloudSettings
Created May 10, 2019 18:57 — forked from tegandbiscuits/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-04-03T15:00:53.348Z","extensionVersion":"v3.2.7"}
@tegandbiscuits
tegandbiscuits / cloudSettings
Last active February 18, 2021 22:56
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-02-18T22:56:11.694Z","extensionVersion":"v3.4.3"}
@siddMahen
siddMahen / prim.py
Created January 4, 2014 22:03
Prim's algorithm, in Python.
from sys import argv
import re
# open the file and get read to read data
file = open(argv[1], "r");
p = re.compile("\d+");
# initialize the graph
vertices, edges = map(int, p.findall(file.readline()))
graph = [[0]*vertices for _ in range(vertices)]
@ddewaele
ddewaele / Android Studio Day1.md
Last active October 7, 2016 11:12
Some notes on my first day with Android Studio

##Introduction

The goal of this article was to take a look at the latest Android Studio (v0.2.5) and see where it would take me in a single day.

For me an IDE should be simple, straightforward and hassle-free. The big pain in Android development has always been the IDE and more specifically the tooling around it. Somehow the Eclipse plugins never worked well with the core Android tools and build system. Third party tools and plugins to offload dependency management to Maven were also far from ideal.

In short, it was a difficult marriage that ultimately led to choosing IntelliJ IDEA as the preferred platform for Android Development Tooling.

Unfortunately this again left developers with a 0.x product, meaning it's going to be very rough around the edges. It's a very difficult decision to make for developers. Stick with something you know but that is far from ideal, or go with something entirely new that is supposed to be better, but in reality could also take a very long time before it reaches some kind of

@nickaknudson
nickaknudson / TimePreference.java
Last active May 10, 2021 04:16
TimePicker DialogPreference for Android
package com.xxx.xxx.preference;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import android.content.Context;
import android.content.res.TypedArray;
@jmondo
jmondo / ubuntu-setup.md
Created April 1, 2012 01:41
Setting up Rails server environment on Ubuntu 11.10

Setting up Rails server environment on Ubuntu 11.10

Including Rails, Passenger, RVM, Ruby 1.9.3, SSH keys, Postgres and a test app

Instructions

  • This is tested on a clean install of Ubuntu 11.10 server (with SSH root access), though it should work on whatever install you have now.
  • Replace LOGIN with your ubuntu username
  • Replace SERVER_ADDRESS with the IP address of your server
@SchizoDuckie
SchizoDuckie / apf_release.prepend.js
Created March 20, 2012 20:19
Cloud9 IDE Touch Enabler Monkeypatch
/**
* A proof of concept monkeypatch to make Cloud9 IDE work on a tablet.
* Since i'm an extremely lazy bastard I prepended this snippet directly in package/client/js/apf_release.js
*
* What does it do?
* - It fires a doubleclick for a 2-finger tap
* - It fires a mousewheel up / down event for a 2-finger swipe up / down.
*
* How does it work?
* Prepend the functions below to <cloud9>/package/client/js/apf_release.js, save, load in tablet.
@maca
maca / das_download.rb
Created February 11, 2012 09:08
Script to download all Destroy All Software screencasts, account needed
#! /usr/bin/env ruby
# usage:
# $ das_download.rb email password [download_directory]
require 'mechanize'
# gem 'mechanize-progressbar'
email = ARGV[0] or raise('Please provide the email address for your account')
password = ARGV[1] or raise('Please provide the password for your account')
path = ARGV[2] || './'
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@rwilcox
rwilcox / asset_path.rb
Created August 17, 2011 14:39
AssetPath.sass_require: for sharing SASS variables between SASS files in the Rails 3.1 Asset Pipeline
module AssetPath
# Why this instead of Sproket's require_tree?
# Sprokets compiles one SASS file at a time, which works OK... until you want
# to pull out some SASS things (mixins, layout settings) into separate files.
# In that case, you want to have SASS compile everything all at once, in one big file
# So, use this helper to include all the SASS files down a path
#
# The alternative is the ugly (and not DRY!): <http://asciicasts.com/episodes/268-sass-basics>
# where you list every file manually in the application.css.scass file.