Skip to content

Instantly share code, notes, and snippets.

@Monomachus
Monomachus / image-picker.component.ts
Created Mar 10, 2020
Using orientation to flip image in Ionic 4
View image-picker.component.ts
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);
@Monomachus
Monomachus / project.json
Created Oct 31, 2016
Dotnet watch is not running with this project.json
View project.json
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
View gist:1675621
<?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 Jan 25, 2012
Faker as I thought it should be.
View gist:1675612
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 / PackageScanner.java
Created May 31, 2011
Package Scanner for Active Objects
View PackageScanner.java
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 {
View MonthsCArray.m
#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)
You can’t perform that action at this time.