@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).
Here we go with the explanations:
(function(x, f = () => x) {
package config | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/pem" | |
"io/ioutil" | |
"github.com/CodeCollaborate/Server/utils" |
# Cleans up branches like: | |
# if Shopify.rails_next? | |
# # Rails 5 login | |
# else | |
# # Rails 4 login | |
# end | |
module RuboCop | |
module Cop | |
module ShopifyRails | |
class RailsNextUnless < Cop |
yum -y install bzip2-devel libtiff-devel giflib-devel ghostscript-devel libwmf-devel jasper-devel libtool-ltdl-devel libXext-devel libXt-devel librsvg2-devel OpenEXR-devel libwebp-devel | |
rpm -ivh http://vault.centos.org/centos/7/updates/Source/SPackages/ImageMagick-6.7.8.9-15.el7_2.src.rpm | |
sed -i '/BuildRequires:\tghostscript-devel/a BuildRequires:\tlibwebp-devel' /root/rpmbuild/SPECS/ImageMagick.spec | |
sed -i '/Requires: pkgconfig/a Requires: libwebp' /root/rpmbuild/SPECS/ImageMagick.spec | |
rpmbuild -ba /root/rpmbuild/SPECS/ImageMagick.spec | |
# actual install | |
rpm -Uvh --force /root/rpmbuild/RPMS/x86_64/ImageMagick-6.7.8.9-15.el7.centos.x86_64.rpm |
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).
Here we go with the explanations:
(function(x, f = () => x) {
#import <UIKit/UIKit.h> | |
@interface UIView (SMFrameAdditions) | |
@property (nonatomic, assign) CGPoint $origin; | |
@property (nonatomic, assign) CGSize $size; | |
@property (nonatomic, assign) CGFloat $x, $y, $width, $height; // normal rect properties | |
@property (nonatomic, assign) CGFloat $left, $top, $right, $bottom; // these will stretch the rect | |
@end |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
#import <objc/runtime.h> | |
#import <UIKit/UIKit.h> | |
@interface UIWebView (HackishAccessoryHiding) | |
@property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView; | |
@end | |
@implementation UIWebView (HackishAccessoryHiding) | |
static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView"; |
This gist assumes:
// | |
// MNDocumentConflictResolutionViewController.h | |
// MindNodeTouch | |
// | |
// Created by Markus Müller on 15.12.11. | |
// Copyright (c) 2011 __MyCompanyName__. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@class MNDocumentReference; |