Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Homeyer homeyer

  • Boulder, CO
View GitHub Profile
View github-deployment-success.sh
#!/bin/bash
# Notify GitHub of a successful deployment
notify_gh_about_a_deployment () {
declare -r deployment_id=${1}
declare -r deployment_status=${2}
curl -s -X POST "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/deployments/${deployment_id}/statuses" \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.github.ant-man-preview+json' \
-u ${GITHUB_ACCESS_TOKEN} \
View github-deployment.sh
#!/bin/bash
# Create a deployment
create_gh_deployment () {
curl -s -X POST "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/deployments" \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.github.ant-man-preview+json' \
-u ${GITHUB_ACCESS_TOKEN} \
-d "{"ref": "${CIRCLE_SHA1}", "environment": "${environment}", "required_contexts": [], "auto_merge": false}"
}
View marketplace-passport-example.js
// “InstallationURL” configured in marketplace
app.get('/marketplace/purchase',
// mark as a marketplace purchase
(req, res, next) => {
req.session.isMarketplacePurchase = true;
next();
},
//send users through your normal GitHub Oauth
passport.authenticate('github')
);
View git-taculous.zsh-theme
autoload -U add-zsh-hook
autoload -Uz vcs_info
setopt promptsubst
local reset white grey green red yellow
reset="%{${reset_color}%}"
white="%{$fg[white]%}"
grey="%{$fg_bold[black]%}"
green="%{$fg_bold[green]%}"
View sass_converter.rb
module Jekyll
# Sass plugin to convert .scss to .css
#
# Note: This is configured to use the new css like syntax available in sass.
require 'sass'
class SassConverter < Converter
safe true
priority :low
def matches(ext)
@homeyer
homeyer / _myapp-buttons.scss
Created Oct 7, 2011
ExtJS green button component UI definition
View _myapp-buttons.scss
@include extjs-button-ui(
/* UI + Scale */
'green-small',
$border-radius: $button-small-border-radius,
$border-width: $button-small-border-width,
$border-color: green,
$border-color-over: green,
$border-color-focus: green,
@homeyer
homeyer / app.js
Created Oct 7, 2011
An Ext window with a green button using a custom component UI
View app.js
Ext.application({
name: 'My App',
launch: function() {
Ext.create('Ext.window.Window',{
title: 'Custom Window',
width : 200,
height : 150,
modal: true,
layout: 'fit',
@homeyer
homeyer / index.html
Created Oct 7, 2011
index.html for basic ExtJS 4 app
View index.html
<html>
<head>
<link rel="stylesheet" type="text/css" href="resources/css/my-ext-theme.css">
<script type="text/javascript" src="extjs/ext.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body></body>
</html>
@homeyer
homeyer / app.js
Created Oct 7, 2011
ExtJS4 out of the box window styling
View app.js
Ext.application({
name: 'My App',
launch: function() {
Ext.create('Ext.window.Window',{
title: 'Custom Window',
width : 200,
height : 150,
modal: true,
layout: 'fit',
View gist:437312
@property(nonatomic, retain) IBOutlet CustomUIActionSheetViewController *customUIActionSheetViewController;
You can’t perform that action at this time.