This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set d to the clipboard as «class PNGf» | |
set fid to open for access "/tmp/screenshot.png" with write permission | |
write d to fid | |
close access fid | |
-- http://www.michael-hogg.co.uk/applescript.php | |
-- helped me figure this one out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSData+Base64.h | |
// base64 | |
// | |
// Created by Matt Gallagher on 2009/06/03. | |
// Copyright 2009 Matt Gallagher. All rights reserved. | |
// | |
// This software is provided 'as-is', without any express or implied | |
// warranty. In no event will the authors be held liable for any damages | |
// arising from the use of this software. Permission is granted to anyone to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface NSDictionary (JBSObjectForPath) | |
/** | |
Returns the object from a nested `NSDictionary` at the given path, with path | |
components separated by a "/". For example, if you have the following | |
dictionary: | |
~~~~ | |
{"foo":{"bar":"foobar"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface UIColor (JBSUtilities) | |
/** | |
Give it a hex string, e.g. "#FFEEDD" or "FFEEDD", get back the UIColor | |
representation. | |
@param stringToConvert A NSASCIIStringEncoding hex string. | |
@return The UIColor represented by the hex string. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
#define IS_IPHONE (!IS_IPAD) | |
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPhone) | |
/** | |
Provides a few methods to determine what sort of device the application is | |
running on. Specifically, the methods make it easy to determine what sort of | |
iPhone resolution is available: `[[UIApplication sharedApplication] isIphone3]` | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.jrfom</groupId> | |
<artifactId>CHANGE-ME</artifactId> | |
<version>0.1</version> | |
<packaging>jar</packaging> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration scan="true" scanPeriod="1 minute"> | |
<variable | |
name="logPattern" | |
value="%-30(%d{MMM dd YYYY HH:mm:ss.SSS} [%thread]) %-5level %logger{5} [%file:%line] - %msg%n" /> | |
<!-- | |
The base name of the log file. For "example.log" this would | |
simply be "example". Or if it were "logs/example.log" then | |
"logs/example". | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Initial firewall building script. | |
## Should be run as root. | |
it=$(which iptables) | |
################################################################################ | |
## Use this section to establish prerouted port redirects. | |
## For example, redirect port "80" to port "8080". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jrfom.fuck.oracle; | |
import java.lang.management.ManagementFactory; | |
import java.sql.Driver; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; | |
import java.util.Enumeration; | |
import java.util.Hashtable; | |
import javax.management.MBeanServer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The author disclaims copyright to this source code. In place of | |
* a legal notice, here is a blessing: | |
* | |
* May you do good and not evil. | |
* May you find forgiveness for yourself and forgive others. | |
* May you share freely, never taking more than you give. | |
* | |
*/ | |
package org.hibernate.dialect; |
OlderNewer