Skip to content

Instantly share code, notes, and snippets.

View andykent's full-sized avatar

Andy Kent andykent

View GitHub Profile
# name: Google Search
# description: Search Google for stuff.
# keyword: google
# homepage: http://google.com
bolt.run ->
if command.hasQuery
url = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q="+command.query+"&callback=?"
http.getJSON url, (data) ->
# name: Github
# description: search github
# keyword: github
bolt.run ->
if command.hasQuery
log command.query
url = "https://api.github.com/legacy/repos/search/#{command.query}?callback=?"
http.getJSON url, (data) ->
log data
@andykent
andykent / unescape.go
Created June 18, 2013 14:54
Small go program to run through a list on stdin and URL unescape each line.
package main
import "fmt"
import "os"
import "net/url"
import "bufio"
func main() {
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
@andykent
andykent / orca.rb
Last active December 18, 2015 16:58
An Example Orca File
require "rest-client"
require "orca/extensions/apt"
require "orca/extensions/file_sync"
group 'server' do
node 'kent-web-1', 'xxx.xxx.xxx.xxx', :test_url => 'http://mysite.com/'
end
package 'app' do
depends_on 'deploy-user'
@andykent
andykent / FastImg.css
Last active August 16, 2020 20:47
Render Medium style blurred preview images using react-imgix
.aspectWrapper {
position: absolute;
width: 100%;
height: 100%;
}
.wrapper {
position: absolute;
width: 100%;
height: 100%;
@andykent
andykent / slate-react.d.ts
Last active May 19, 2020 11:45
Slate TypeScript Definitions
declare module 'slate-react' {
import * as Slate from 'slate'
import * as Immutable from 'immutable'
import { ReactNode } from 'react'
type RenderMarkProps = {
mark: { type: string },
children: ReactNode
}