Skip to content

Instantly share code, notes, and snippets.

#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
const char *monthArray[12] = {"January", "February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November", "December"};
if (argc > 0)
@Monomachus
Monomachus / PackageScanner.java
Created May 31, 2011 08:00
Package Scanner for Active Objects
package com.pocketgator.placeholder.common;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import net.java.ao.RawEntity;
public class PackageScanner {
@Monomachus
Monomachus / gist:1675621
Created January 25, 2012 09:28
Entity for Faker
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Udevi\ChurchBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
@Monomachus
Monomachus / gist:1675612
Created January 25, 2012 09:25
Faker as I thought it should be.
bazinga_faker:
orm: doctrine
entities:
Udevi\ChurchBundle\Entity\Person:
number: 25
custom_formatters:
LastName: { method: lastName }
FirstName: { method: firstName }
Active: { method: boolean, parameters: [100]}
BirthDay: { method: dateTimeThisCentury }
@Monomachus
Monomachus / project.json
Created October 31, 2016 12:15
Dotnet watch is not running with this project.json
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
@Monomachus
Monomachus / image-picker.component.ts
Created March 10, 2020 10:13
Using orientation to flip image in Ionic 4
onFileChosen(event: Event) {
const pickedFile = (event.target as HTMLInputElement).files[0];
if (!pickedFile) {
return;
}
let originalOrientation = 1;
ImageHelper.getOrientation(pickedFile, (orientation) => {
console.log('Orientation', orientation);