A few notes and links from the Lunch & Learn.
-
Two Sentences About Getting Older and Working on the Web - Frank Chimero
Github is confusing, Git is confusinger, pretty much everything in a modern web stack no longer makes sense to me
window.fluid.dockBadge = ''; | |
function updateDockBadge() { | |
console.log('check new messages'); | |
var navigation = document.querySelector('[role=navigation]') | |
var doc = navigation.contentDocument || navigation.ownerDocument; | |
if (!doc) { return; } |
A few notes and links from the Lunch & Learn.
Two Sentences About Getting Older and Working on the Web - Frank Chimero
Github is confusing, Git is confusinger, pretty much everything in a modern web stack no longer makes sense to me
window.fluid.dockBadge = ''; | |
setTimeout(updateDockBadge, 1000); | |
setTimeout(updateDockBadge, 3000); | |
setInterval(updateDockBadge, 5000); | |
function updateDockBadge() { | |
window.fluid.dockBadge = document.querySelector('[title^="Inbox"]').title.match(/\d+/); | |
} |
The initial Fluidium 0.1 release is based on the browser code powering both Fluid SSBs and Cruz (www.fluidapp.com, www.cruzapp.com). | |
Almost all of the code included in this project was updated prior to this release, and some of it was rewritten completely. Most of the rewriting was done due to messiness/poor architecture in the old codebase, and because I've learned a lot while writing and maintaining a Cocoa browser codebase over the past two years. | |
Stuff that was completely rewritten (and therefore may not be well-tested yet): | |
- FUDocumentController/FUDocument/FUWindowController/FUTabController/FUWindow : this is the code which handles basic browser window/tab management, and is the core functionality of the browser. It conforms to the Cocoa Document-based application design pattern. | |
- Userscripting : previously, Fluid and Cruz userscripting was based on GreaseKit. That has been removed and replaced with a new implementation in Fluidium. |
- (NSData *)PDFDataForMultiPageDocument { | |
NSMutableData *data = [NSMutableData data]; | |
CGDataConsumerRef consumer = CGDataConsumerCreateWithCFData((CFMutableDataRef)data); | |
if (NULL == consumer) { | |
NSLog(@"could not create consumer"); | |
return nil; | |
} | |
CGRect r = CGRectMake(0.0, 0.0, 800.0, 600.0);; | |
set path_ to (get path to desktop as string) & "FOLDER NAME HERE" | |
set prefix_ to "PREFIX HERE" | |
tell application "Finder" | |
set dir_ to folder path_ | |
set files_ to items of dir_ whose name of it starts with prefix_ | |
set start_ to (get length of prefix_) + 1 | |
repeat with file_ in files_ | |
set oldname_ to name of file_ | |
set end_ to length of oldname_ |
set doubleDirPath_ to "path to 2x images" | |
set singleDirPath_ to "path to 1x images" -- also destination path | |
set ext_ to ".png" | |
set extLen_ to length of ext_ | |
set suffix_ to "@2x" | |
tell application "Finder" | |
set doubleDir_ to folder doubleDirPath_ | |
set singleDir_ to folder singleDirPath_ | |
set dirs_ to (get every item of doubleDir_) |
set _srcPath to ((get path to desktop) & "Backup:Pictures" as string) | |
set _destPath to ((get path to desktop) & "Out" as string) | |
on processDir(_parent) | |
tell application "Finder" | |
set _parentName to (get name of _parent as string) | |
set _kids to (get every item of _parent whose name is not ".") | |
if "Thumbs" is equal to _parentName then | |
return | |
else if "Originals" is equal to _parentName then |
void myfunc() { | |
void *thing1 = NULL; | |
void *thing2 = NULL; | |
@try { | |
thing1 = allocThing1(); | |
if (!thing1) return; | |
// …use thing1 maybe |
// | |
// main.m | |
// Finally | |
// | |
// Created by Todd Ditchendorf on 6/19/15. | |
// Copyright (c) 2015 Todd Ditchendorf. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |