Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
@gmarik
gmarik / curl.cmd
Created April 11, 2011 02:40 — forked from morhetz/curl.cmd
@rem Do not use "echo off" to not affect any child calls.
@setlocal
@rem Get the abolute path to the parent directory, which is assumed to be the
@rem Git installation root.
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH%
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%
syntax on
set nocompatible " Unset compatibility with VI, it's 2011!
set wildmenu
set wildmode=list:longest " make cmdline tab completion similar to bash
set backup " Activate backup stuff
set backupdir=~/.vim/backup
set directory=~/.vim/tmp
set showmatch " Show matching brackets

Getting started

First add your twitter username and password. Then server.rb and once it's started open websocket.html in your browser. You should see some tweets appear. If not take a look at the javascript console.

" Modularized configuration for vim
" Randy Morris <randy.morris@archlinux.us>
" Plugins
if v:version < 700
finish
endif
" {{{ Vundle setup
@gmarik
gmarik / makeapp.sh
Created August 26, 2012 22:50 — forked from demonbane/makeapp.sh
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
package main
import (
"bufio"
"fmt"
"net"
)
type Client struct {
incoming chan string
@gmarik
gmarik / analyze.go
Created November 12, 2015 19:26 — forked from nf/analyze.go
'spent' script to log where time is spent
package main
import (
"bufio"
"fmt"
"os"
"regexp"
"sort"
"strconv"
"strings"
@gmarik
gmarik / Dockerfile
Created September 29, 2019 06:37 — forked from Irio/Dockerfile
GCP Serverless scrapers
FROM golang:1.12 as build
WORKDIR $GOPATH/src/github.com/Irio/wohnung
COPY scraper scraper
COPY main.go .
RUN go get -d -v ./...
RUN go install
FROM gcr.io/distroless/base
@gmarik
gmarik / google-apps-script.md
Last active June 23, 2020 05:56 — forked from labnol/google-apps-script.md
How to Learn Google Apps Script - The best resources for learning Google Apps Script, the glue that connects GSuite services including Gmail, Google Drive, Calendar, Maps, Analytics and more.

Learning Google Apps Script

The best place to learn more about Google Script is the official documentation available at developers.google.com. Here are other places that will help you get up to speed.

  1. MAKING A GMAIL BOT WITH APPS SCRIPT AND TYPESCRIPT
  2. Google Apps Scripts - Snippets by +Amit Agarwal
  3. Apps Script Starter - Create Google Apps Script projects locally inside VS Code.
  4. Digital Inspiration by +Amit Agarwal - Google Addons
  5. Awesome Google Scripts by +Amit Agarwal
  6. Build with Google Apps Script - Setup a local development environment for Apps Script