Skip to content

Instantly share code, notes, and snippets.

View damondouglas's full-sized avatar
💭
😼

Damon damondouglas

💭
😼
  • Google, Inc.
View GitHub Profile
@damondouglas
damondouglas / crosh_ssh_mac.md
Last active August 29, 2015 13:56
Secure passwordless crosh ssh login from chromebook to mac

Secure passwordless crosh ssh login from chromebook to mac

Generate Keys

ssh-keygen -f <filename>

Add public key to server

cat <filename>.pub >> ~/.ssh/authorized_keys

Copy and .pub to Chromebook /Downloads folder

@damondouglas
damondouglas / updatedart.sh
Last active August 29, 2015 13:56
Update Dart
cd ~/Downloads/
pwd
rm -rf dart
rm darteditor-macos-x64.zip
curl -O http://storage.googleapis.com/dart-archive/channels/stable/release/latest/editor/darteditor-macos-x64.zip
unzip darteditor-macos-x64.zip
ls dart*
cd /usr/local
pwd
ls dart
@damondouglas
damondouglas / filestructure.md
Created February 19, 2014 02:54
Copy file into each subdirectory that matches a regular expression
  • somefile.txt
  • 1-dir
  • 2-dir
  • 3-dir
  • 4-dir
@damondouglas
damondouglas / dart-terminal-sublime.md
Last active August 29, 2015 13:56
How to set up sublime and terminal for Dart Programming.

How to set up sublime and terminal for Dart Programming (If you use mac).

Install Dart

  1. Download Dart

  2. Copy dart to /usr/local/dart

unzip darteditor-macos-x64.zip
cp -R path/to/unzipped/dart /usr/local/dart
{
"end": {
"dateTime": "2014-02-27T20:00:00",
"timeZone": "EST"
},
"start": {
"dateTime": "2014-02-27T19:00:00",
"timeZone": "EST"
},
"summary": "test",

meta tag viewports

<meta name="viewport" content="...">

"width=nnn"

Forces screen to scale to optimum page width

@damondouglas
damondouglas / install content shell.sh
Last active August 29, 2015 13:57
Assumes dart in /usr/local/dart
cd /usr/local/dart/chromium
sudo chmod +x download_contentshell.sh
sudo ./download_contentshell.sh
sudo unzip content_shell-macos-ia32-release.zip
@damondouglas
damondouglas / main.dart
Created April 3, 2014 03:22
codingame.com | Question 1 - Power of Thor
import 'dart:io';
import 'dart:math';
void main() {
String line = stdin.readLineSync();
var e = line.split(' ').map((i) => int.parse(i)).toList();
var lx = e[0];
var ly = e[1];
#!/usr/bin/env python
__author__ = 'Charles Hooper <charles.hooper@dotcloud.com>'
import socket, ssl
socket.setdefaulttimeout(3)
class EasySSLWrap(object):
"""Connect over TCP+SSL using a context manager.
Usage:

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: