Skip to content

Instantly share code, notes, and snippets.

diff --git a/coder_sniffer/Drupal/ruleset.xml b/coder_sniffer/Drupal/ruleset.xml
index b718894..116fe60 100644
--- a/coder_sniffer/Drupal/ruleset.xml
+++ b/coder_sniffer/Drupal/ruleset.xml
@@ -3,6 +3,10 @@
<ruleset name="Drupal">
<description>Drupal coding standard</description>
+ <rule ref="Drupal.Commenting.InlineComment.DocBlock">
+ <severity>0</severity>
@raven
raven / Breakpoints_v2.xcbkptlist
Last active August 30, 2019 00:53
Symbolic breakpoint for dynamically linking libReveal against UIApplicationMain
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
@mattvlasach
mattvlasach / XCodeServerTestFlightPostAction.sh
Last active June 24, 2023 16:49 — forked from djacobs/automatedBuildAndUploadToTestflight.sh
This script is intended to be run as a Post-Action Shell Script on an Archive action, on an Xcode Continuous Integration server. See http://matt.vlasach.com/xcode-bots-hosted-git-repositories-and-automated-testflight-builds/ for a full step-by-step guide.
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
# Valid and working as of 10/29/2013
# Xcode 5.0.1, XCode Server
#
API_TOKEN="<Your TesFlight API Token>"
TEAM_TOKEN="<Your TestFlight Team Token>"
DISTRIBUTION_LISTS="<Comma separated TestFlight Distribution List Names for auto deploy>"
@steipete
steipete / UIKitLegacyDetector.m
Last active March 12, 2024 13:57
A simple way to detect at runtime if we're running in UIKit legacy mode or the new "flat" variant. Written for our PDF iOS SDK (http://pspdfkit.com), where the precompiled binary needs to detect at runtime in what variant it's running. Want more stuff like that? Follow me on Twitter: http://twitter.com/steipete
// Taken from http://PSPDFKit.com. This snippet is under public domain.
#define UIKitVersionNumber_iOS_7_0 0xB57
BOOL PSPDFIsUIKitFlatMode(void) {
static BOOL isUIKitFlatMode = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
// We get the modern UIKit if system is running >= iOS 7 and we were linked with >= SDK 7.
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) {
isUIKitFlatMode = (NSVersionOfLinkTimeLibrary("UIKit") >> 16) >= UIKitVersionNumber_iOS_7_0;
}
@brentsimmons
brentsimmons / gist:5810992
Last active January 3, 2021 02:22
Detect a tap on a URL inside a UITextView. Note: the rs_links method isn't included -- you'll need something that takes text and returns an array of detected links. This gist just demonstrates walking through the UITextView characters.
@implementation UITextView (RSExtras)
static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) {
/*[s length] is assumed to be 0 or 1. s may be nil.
Totally not a strict check.*/
if (s == nil || [s length] < 1)
return NO;
@opi
opi / gist:5501735
Created May 2, 2013 11:55
Debug Drupal EntityFieldQuery
<?php
/**
* Implements hook_query_alter().
*
* Adds a tag management named "query_debug" that permits to retrieve
* the concerned request implementing this tag.
* Only for development use. Custom requests SHOULDN'T implement this tag in a
* production website.
*/
@theaboutbox
theaboutbox / .ackrc
Created September 20, 2012 21:49
My .ackrc
--type-add=css=.sass,.less,.scss
--type-add=ruby=.rake,.rsel,.builder,.thor
--type-add=html=.haml,.html.erb,.html.haml
--type-add=js=.js.erb,.coffee
--type-set=cucumber=.feature
--type-set=c=.c,.cpp,.ino,.pde,.h
--ignore-dir=vendor
--ignore-dir=log
--ignore-dir=tmp
--ignore-dir=doc
@blazingpair
blazingpair / gist:3069750
Created July 8, 2012 07:13
Automatically trim whitespace on git commit, save to .git/hooks/pre-commit
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1 ; then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
# Find files with trailing whitespace
@ahawthorne
ahawthorne / .gitignore
Created March 14, 2012 17:42
Wordpress .gitignore
wp-content/uploads/
wp-conten/files_mf/
stats/
wp-config.php
sitemap.xml
*.gz
*.sql
*.mysql
*.zip
@Abizern
Abizern / uuidgen.m
Created December 20, 2011 11:51
A method that returns a UUID in an ARC environment.
- (NSString *)uuidString {
// Returns a UUID
CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
NSString *uuidStr = (__bridge_transfer NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid);
CFRelease(uuid);
return uuidStr;
}