An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
begin | |
require 'compass' | |
require 'compass/exec' | |
rescue LoadError | |
require 'rubygems' | |
require 'compass' | |
require 'compass/exec' | |
end | |
module Jekyll |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
<!doctype html> | |
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]--> | |
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]--> | |
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name='description' content='{MetaDescription}'> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
#!/usr/bin/env python | |
# | |
# cocoa_keypress_monitor.py | |
# Copyright © 2016 Bjarte Johansen <[email protected]> | |
# | |
# The MIT License (MIT) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# “Software”), to deal in the Software without restriction, including |
class people::jfryman { | |
# Applications | |
include chrome::stable | |
include onepassword | |
include dropbox | |
include alfred | |
include macvim | |
include zsh | |
include homebrew | |
include fitbit |
brew install mutt
brew install terminal-notifier
terminal-notifiergem install imap_notifier
imap_notifierbrew install urlview
brew install w3m
(links
would be OK too)class Api | |
class << self | |
# Init API server, with the shared client | |
def init_server | |
if Auth.needlogin? | |
AFMotion::SessionClient.build_shared(BASE_URL) do | |
session_configuration :default | |
header "Accept", "application/json" |
class AfterSignupController < ApplicationController | |
include Wicked::Wizard | |
steps :create_organization, :create_event, :create_tiers | |
def show | |
case step | |
when :create_organization | |
@form = Form::Organization.new(Organization.new) | |
when :create_event | |
@form = Form::Event.new(Event.new) |
#!/bin/bash | |
# dontforget | |
# | |
# A stupid script for short term reminders in bash | |
# | |
# Arguments just need to contain a number and a bunch of words. | |
# | |
# The number can be anywhere in the arguments, but there shouldn't | |
# be any other numeric digits. | |
# |
If you have any sort of administrative interface on your web site, you can easily imagine an intruder gaining access and mucking about. How do you know the extent of the damage? Adding an audit log to your app is one quick solution. An audit log should record a few things:
Using the Rails framework, this is as simple as adding a before_action
to your admin controllers. Here’s a basic version that I’m using in production.