This file contains 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
// | |
// UISlider+MacCatalyst.m | |
// Elytra | |
// | |
// Created by Nikhil Nigade on 30/09/20. | |
// | |
/** | |
* USE AT YOUR OWN RISK! | |
* The only downside of using this category is that you end up with a slider with a comically larger tracking button. |
This file contains 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 | |
class FourColumnsContainerViewController: UIViewController { | |
let outerSplitViewController = UISplitViewController(style: .tripleColumn) | |
let innerSplitViewController = UISplitViewController(style: .doubleColumn) | |
let primary = makeContentViewController("App") | |
let secondary = makeContentViewController("Files") | |
let mainContent = makeContentViewController("File Content") | |
let inspector = makeContentViewController("Inspector") |
This file contains 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
<dict> | |
<key>Comment</key> | |
<string>_xcpm_SMT_scope_msrs 1 © Pike R. Alpha</string> | |
<key>Disabled</key> | |
<false/> | |
<key>Find</key> | |
<data> | |
vgsAAABd6QgAAAA= | |
</data> | |
<key>MatchOS</key> |
This file contains 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 issue this whole time was the UITextView would not wait for the pan gesture of it's hosting UIScrollView to fail. | |
* Once we find out the correct gestures to hook into, we can ensure they don't get recognized simultaneously. | |
*/ | |
@interface TextViewSubclass : UITextView <UIGestureRecognizerDelegate> { | |
BOOL _hasHookedGesturesForiOS13LinkTapBug; | |
} | |
- (void)_hookGestures; |
This file contains 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
<picture id="theme-default" class="active"> | |
<source srcset="/images/1.4/image-dark-414.png, /images/1.4/image-dark@2x.png 2x" media="(max-width: 414px) and (prefers-color-scheme: dark)" /> | |
<source srcset="/images/1.4/image-dark-768.png, /images/1.4/image-dark@2x.png 2x" media="(max-width: 768px) and (prefers-color-scheme: dark)" /> | |
<source srcset="/images/1.4/image-dark@3x.png" media="(min-width: 769px) and (prefers-color-scheme: dark)" /> | |
<source srcset="/images/1.4/image-414.png, /images/1.4/image@2x.png 2x" media="(max-width: 414px)" /> | |
<source srcset="/images/1.4/image-768.png, /images/1.4/image@2x.png 2x" media="(max-width: 768px)" /> | |
<source srcset="/images/1.4/image@3x.png" media="(min-width: 769px)" /> | |
<img src="/images/1.4/image@2x.png" alt="Elytra's Primary Interfaces" width="1041" /> | |
</picture> |
This file contains 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
- (void)copy:(id)sender { | |
// calling the following crashes the app instantly | |
// due to a possible bug in iOS 12.1.4. | |
// [super copy:sender]; | |
NSRange range = self.selectedRange; | |
if (range.location != NSNotFound && range.length > 0) { | |
This file contains 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
/^ | |
(0[0-9]|1[1-9]|2[0-9]|3[0-7]) // matches the first two digits. This needs to be within the 01-37 range | |
[A-Z]{3} // first three letters of the PAN Card | |
[CPHFATBLJG]{1} // PAN limited set control character | |
[A-Z]{1} // PAN non-limited set control character | |
\d{4} // PAN Identity numbers | |
[A-Z]{1} // PAN non-limited set control character | |
\d{1} // GST control number | |
[A-Z0-9]{2} // GST non-limited control characters | |
$/g |
This file contains 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
export CHROME_BIN=/usr/bin/google-chrome | |
export DISPLAY=:99.0 | |
sh -e /etc/init.d/xvfb start | |
sudo apt-get update | |
sudo apt-get install -y libappindicator1 fonts-liberation | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome*.deb |
This file contains 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
const run = () => +new Date() | |
let arr = Array.from({length: 100}, run) | |
arr.reduce((x, y) => { | |
x.then(result => { | |
console.log(x) | |
return y | |
}, err => { | |
console.error(err) |
This file contains 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 following is taken from the following tweet | |
// https://twitter.com/benfrain/status/794138525570580480 | |
* { | |
all: unset; | |
} | |
head { | |
display: none; | |
} |