Skip to content

Instantly share code, notes, and snippets.

View shadowfacts's full-sized avatar
🖕
stop turning github into a social network, micro$oft

Shadowfacts shadowfacts

🖕
stop turning github into a social network, micro$oft
View GitHub Profile
@shadowfacts
shadowfacts / .gitignore
Created April 25, 2015 01:56
Objective-C .gitignore
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
minecraft {
srgExtra "PK: com/typesafe/config my/mod/package/repackage/com/typesafe/config"
}
configurations {
external
compile.extendsFrom external
}
dependencies {
@shadowfacts
shadowfacts / .gitignore
Created June 5, 2015 01:49
Java/Gradle gitignore
# gradle
/.gradle
/build
# eclipse
/eclipse
/.settings
/.metdata
/.classpath
/.project
//The lib can obviously be used from Java too
//Add jcenter repository (it's actually the gradle default)
//compile "uk.co.rx14.jmclaunchlib:jMCLaunchLib:0.2.3"
def instance = MCInstance.createForge(
"1.7.10", //Minecraft Version
"1.7.10-10.13.3.1408-1.7.10", //Forge version
"test/instance", //Caches directory
"test/launch", //Run directory
NullSupplier.INSTANCE //Credentials supplier (Supplier<Credential>)
@hilburn
hilburn / General topics
Last active January 6, 2016 05:20
Modding Tutorial Series
1. Setting up the environment - git, Gradle and base mod file.
2. My first things - an exploration of Items, Blocks, ItemBlocks (mebbe), and recipes
3. More interesting blocks - blocks that do things - redstone interactions, crops, maybe a simple fluid/block, things like that.
4. Witchcraft - advanced items - looking at the different ways to get items to do stuff, maybe make some tools and weapons? custom food?
5. Intro to Events - what can they do for me?
6. Configs - letting users have their way with your precious creation
7. Inventories and basic tile entities
8. Packets and preventing sync issues
9. Guis and Containers - when, how and why to use them.
10. Custom recipes (both crafting and machine) and NEI integration
@matthewprenger
matthewprenger / changelog-auth.gradle
Last active July 5, 2016 11:12
Jenkins Gradle Changelog Init Script, place this in ~/.gradle/init.d/changelog.gradle on your Jenkins server. Projects can simply call 'project.changelog' to get the changes for the current build.
def buildUrl = System.getenv().BUILD_URL
if (buildUrl != null) {
def auth = "<USER>:<APITOKEN>".getBytes().encodeBase64().toString()
def url = new URL("$buildUrl/api/xml?depth=20").openConnection()
url.setRequestProperty("Authorization", "Basic " + auth)
String data = url.getInputStream().text
def changelog = ""
@matthewprenger
matthewprenger / build.gradle
Last active June 18, 2022 18:01
CoFH CurseForge Dependencies
// The URL for each mod often changes based on the version you want.
// To find the correct URL, download the (DEOBFUSCATED!) mod from CurseForge,
// and look in your browser's download history to find the URL it came from.
// Use the numbers from that in place of the ones below
repositories {
ivy {
name "CoFHLib"
artifactPattern "http://addons-origin.cursecdn.com/files/2229/525/[module]-[revision].[ext]"
}
@smileyborg
smileyborg / InteractiveTransitionCollectionViewDeselection.m
Last active January 15, 2023 13:03
Animate table & collection view deselection alongside interactive transition (for iOS 11 and later)
// UICollectionView Objective-C example
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
NSIndexPath *selectedIndexPath = [[self.collectionView indexPathsForSelectedItems] firstObject];
if (selectedIndexPath != nil) {
id<UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator;
if (coordinator != nil) {
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
@douglashill
douglashill / KeyboardTableView.swift
Last active March 30, 2023 22:01
A UITableView that allows navigation and selection using a hardware keyboard.
// Douglas Hill, December 2018
// Made for https://douglashill.co/reading-app/
// Find the latest version of this file at https://github.com/douglashill/KeyboardKit
import UIKit
/// A table view that allows navigation and selection using a hardware keyboard.
/// Only supports a single section.
class KeyboardTableView: UITableView {
// These properties may be set or overridden to provide discoverability titles for key commands.
@timonus
timonus / programmatic-dynamic-images.m
Last active January 1, 2024 12:08
Programmatically create iOS 13 dynamic images
- (UIImage *)dynamicImage
{
UITraitCollection *const baseTraitCollection = /* an existing trait collection */;
UITraitCollection *const lightTraitCollection = [UITraitCollection traitCollectionWithTraitsFromCollections:@[baseTraitCollection, [UITraitCollection traitCollectionWithUserInterfaceStyle:UIUserInterfaceStyleLight]]];
UITraitCollection *const purelyDarkTraitCollection = [UITraitCollection traitCollectionWithUserInterfaceStyle:UIUserInterfaceStyleDark];
UITraitCollection *const darkTraitCollection = [UITraitCollection traitCollectionWithTraitsFromCollections:@[baseTraitCollection, purelyDarkTraitCollection]];
__block UIImage *lightImage;
[lightTraitCollection performAsCurrentTraitCollection:^{
lightImage = /* draw image */;