Skip to content

Instantly share code, notes, and snippets.

@johnlindquist
johnlindquist / prompts.txt
Created July 23, 2022 22:26
Top Prompts of 2022-08-23
random beautiful landscape
young woman, medium wavy red hair, slightly tanned, heroine, oil painting, portrait, intricate complexity, rule of thirds, in the style of Artgerm, character concept
portrait of a cute mouse as knight in the style of charlie bowater, oil painting
intricate colourfully painted carved wood paneling, dark souls, ivory and copper , artstation
grey curly hair dutch man danny hollander dannyjevriend Studio Ghibli painterly style, portrait symetrical –iw 2
pixel art explosion, painterly
The Entrance to Kingdom of Shangri-La, Beautiful architecture, Atmosphere, Dramatic lighting, Epic composition, Close up, Low angle, Wide angle, by Miyazaki, Nausicaa Ghibli, Breath of The Wild
winter,snow,In the dense primeval forest there was a pool of water after the rain,Crystal butterfly,The light from the cracks of the trees shone on the pool like a mirror, and deep snow covered the land,sun light,concept, art, fantasy,Ghibli, Hayao Miyazaki,4k,cinematic,
handsome anime dragon in Amazon rainforest, dn
@RadGH
RadGH / rs_upload_from_url.php
Last active September 24, 2025 00:39
Upload a file from a URL to the WordPress media gallery. Supports images, PDFs, and other file types.
<?php
/**
* This function uploads a file from a URL to the media library, designed to be placed in your own theme or plugin.
* Metadata will be generated and images will generate thumbnails automatically.
*
* HOW TO USE:
* 1. Add the function below to your theme or plugin
* 2. Call the function and provide the URL to an image or other file.
* 3. If successful, the attachment ID will be returned.
@martellaj
martellaj / archive.php
Last active July 15, 2017 03:30
Converted archive.php file (WordPress 4.3) for "Bootstrap to WordPress" Udemy course
<?php
/**
* The template for displaying archive pages.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Bootstrap to WordPress
*/
get_header(); ?>
anonymous
anonymous / blockerList.json
Created June 25, 2015 00:05
Testing Safari Content Blocker on iMore.com
[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": ".*",
"resource-type": ["script"],
"load-type": ["third-party"],
"if-domain": ["imore.com"]
@tonyalbor
tonyalbor / github xcode project
Created April 6, 2014 02:13
uploading an xcode project to github
// adding xcode project to github
// create git repo on github
// go to directory with .xcodeproj file
git init
git add .
git commit -m 'initial commit'
git remote add origin git@github.com:tonyalbor/REPOSITORY.git
git pull origin master
git push origin master
@dhoerl
dhoerl / KeychainItemWrapper.h
Last active June 19, 2025 07:10
KeychainItemWrapper ARCified. Added the ability to manage a dictionary in place of just a string - the #define PASSWORD_USES_DATA in the .m file switches the mode.
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
@interface ExtendedManagedObject : NSManagedObject {
BOOL traversed;
}
@property (nonatomic, assign) BOOL traversed;
- (NSDictionary*) toDictionary;
- (void) populateFromDictionary:(NSDictionary*)dict;
+ (ExtendedManagedObject*) createManagedObjectFromDictionary:(NSDictionary*)dict
inContext:(NSManagedObjectContext*)context;
@nyoron
nyoron / gist:363423
Created April 12, 2010 10:12
Some sample code for a horizontal paged UIScrollView with a gap between each image, like Photos.app (which looks nicer when paging).
/*
Some sample code for a horizontal paged UIScrollView with a gap between each image (which looks nicer). Note - not using contentInset, we want each page to fill the iPhone screen and the gap only to be visible when scrolling (like Photos.app).
Taking the iPhone status bar into account - our viewport is 320x460
Our UIScrollView is therefore set in Interface Builder to 340x460 with a -10 X offset (so it's larger than the viewport but still centred)
Then we do the following...
*/
// Our image filenames