Skip to content

Instantly share code, notes, and snippets.

@codeclash
codeclash / Dockerfile
Created March 5, 2020 11:22
Add missing gdiplus libraries to aspnetcore docker image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
RUN apt-get update \
&& apt-get install -y --allow-unauthenticated \
libc6-dev \
libgdiplus \
libx11-dev \
&& rm -rf /var/lib/apt/lists/*
# your other stuff below
@codeclash
codeclash / Podfile
Created October 2, 2017 15:29
Sample Expo Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'your-app-name' do
pod 'ExpoKit',
:git => "http://github.com/expo/expo.git",
:tag => "ios/1.20.3",
:subspecs => [
"Core",
"CPP"
{
"Version": null,
"ControllerDescriptions": [
{
"ControllerName": "Login",
"ActionDescriptions": [
{
"ActionName": "PerformLogin",
"Routes": [
"v1/private/users/login"
// by John Muchow
- (UIImage *)convertImageToGrayScale:(UIImage *)image
{
// Create image rectangle with current image width/height
CGRect imageRect = CGRectMake(0, 0, image.size.width, image.size.height);
// Grayscale color space
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();
@codeclash
codeclash / YouTubeView.m
Created May 25, 2010 19:06
UIWebView with Youtube links
@interface YouTubeView : UIWebView
{
}
- (YouTubeView *)initWithStringAsURL:(NSString *)urlString frame:(CGRect)frame;
@end
#import "YouTubeView.h"
@interface YouTubeView : UIWebView
{
}
- (YouTubeView *)initWithStringAsURL:(NSString *)urlString frame:(CGRect)frame;
@end
#import "YouTubeView.h"