Skip to content

Instantly share code, notes, and snippets.

Avatar

Delisa kattrali

View GitHub Profile
@kattrali
kattrali / Use Guzzle.md
Last active Jun 20, 2016
PHP modernization proposals
View Use Guzzle.md

Use Guzzle for HTTP connections

Risks

  • Increases minimum PHP version to 5.5. Some people might be stuck on older versions, though its worth noting that older versions are EOL
@kattrali
kattrali / github-userstyles.css
Created May 2, 2016
Improve activity feed on GitHub.com by removing the non-actionable items like starring and forking so discussions and changesets are easier to see.
View github-userstyles.css
/* Hide forking and starring from activity feed */
div.alert.fork, div.alert.watch_started {
display: none;
}
@kattrali
kattrali / steps.md
Last active Oct 22, 2017
Configuring profanity.im for Hipchat on OS X
View steps.md

Configuring profanity.im for Hipchat on OS X

Installation

Easy

brew install profanity

  • The latest build available today via homebrew is 0.4.4 (which means no support for /occupants pane in rooms), and it does not support desktop notifications.
View DMMMainStoryboard.h
//
// DMMMainStoryboard.h
// Copyright (c) 2014 Delisa Mason. All rights reserved.
// Generated by Ovaltine (http://github.com/kattrali/ovaltine)
#import <Foundation/Foundation.h>
@interface DMMMainStoryboard : NSObject
+(UIStoryboard *)storyboard;
View keybase.md

Keybase proof

I hereby claim:

  • I am kattrali on github.
  • I am kattrali (https://keybase.io/kattrali) on keybase.
  • I have a public key whose fingerprint is 1CA4 C136 28EA 52B9 FEE1 86F7 5112 DFE7 F462 E676

To claim this, I am signing this object:

View gist:8466346
- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller
{
shouldReloadCollectionView = NO;
blockOperation = [NSBlockOperation new];
}
- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id<NSFetchedResultsSectionInfo>)sectionInfo
atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type
{
__weak UICollectionView *collectionView = self.collectionView;
@kattrali
kattrali / ruby_cfstringtransform.rb
Created Sep 18, 2012
Fun with RubyMotion! An extension of the Ruby String class to support transliteration using CFStringTransform()
View ruby_cfstringtransform.rb
# encoding: UTF-8
class String
# Extend string to include transliterations to different orthographies
# from Latin character set or the reverse (`to_latin`)
#
# Supported Orthographies:
# Arabic, Cyrillic, Greek, Hangul, Hiragana, Katakana, Latin, Thai
#
View chicken.rb
###
# Scheme code is translated to YARV byte code, then evaluated in the
# Ruby Virtual Machine
require 'rbconfig'
require 'dl'
require 'fiddle'
require 'strscan'
class RubyVM
@kattrali
kattrali / zsh_completion_generator.rb
Created Jul 23, 2012
How to enable zsh completion for Cocoa classes, methods, and property names for use with the `cocoadex` gem
View zsh_completion_generator.rb
# A script to generate a zsh compdef file from Cocoadex keyword names
# Change the `TARGET` if you store zsh completion files somewhere other
# than `~/.zsh/completion`
#
# Reference:
# - Writing own completion functions : http://askql.wordpress.com/2011/01/11/zsh-writing-own-completion/
require 'rubygems'
require 'cocoadex'
@kattrali
kattrali / cocoadex_completion.sh
Created Jul 20, 2012
How to enable bash completion for Cocoa classes, methods, and property names for use with the `cocoadex` gem
View cocoadex_completion.sh
#!/usr/bin/env sh
#
# cocoadex_completion.sh
#
# Bash completion for Cocoa classes
# Install by saving this file and adding the following to your .bash_profile:
#
# complete -C /path/to/cocoadex_completion.sh -o default cocoadex
/usr/bin/env ruby <<-EORUBY
You can’t perform that action at this time.