Skip to content

Instantly share code, notes, and snippets.

@saposki
saposki / index.js
Created November 22, 2016 19:16
pair programming
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
const API_KEY = 'AIzaSyA3EACxxpvIrSqD355X1tKVu0PrmCg05mM';
YTSearch({key: API_KEY, term: 'surfboards'}, function(data){
console.log(data);
});
//invert.js
$scope.addInvertFilter = function(){
var image = new Image();
image.src = $scope.userPost.imageURI;
var canvas = document.createElement('canvas');
canvas.height = canvas.width;
document.body.appendChild(canvas);
#! /bin/bash
source bin/activate 
python saposki/saposki.py
rm -r sblog.db
python saposki/sblog1.py
<!-- index.html -->
<!DOCTYPE html>
<html>
<head>
<title>Filter Test</title>
<script type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script>
<script src="filter.js"></script>
</head>
//filter.js
var app = angular.module('saposkiFilter', []);
app.controller('MainCtrl', ['$scope', function($scope){
$scope.callSepia = function(){
console.log('Sepia filter applied');
}
$scope.callInvert = function(){
// plant2.js
var Plant = function (leaves, flowers) {
this.height = 0;
this.leaves = leaves;
this.flowers = flowers;
};
Plant.prototype.grow = function () {
this.height++;
// plant.js
var Plant = function (leaves, flowers) {
this.height = 0
this.leaves = leaves
this.flowers = flowers}
Plant.prototype.grow = function () {
//hello.js
console.log('Hello World');
@saposki
saposki / launch_sublime_from_terminal.markdown
Created October 10, 2015 05:41 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation