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
--- /tmp/java/src/configure 2012-07-25 11:34:49.000000000 -0500 | |
+++ configure 2013-04-21 22:56:40.000000000 -0500 | |
@@ -1,4 +1,4 @@ | |
-#! /bin/sh | |
+#! /bin/bash | |
# Guess values for system-dependent variables and create Makefiles. | |
# Generated by GNU Autoconf 2.65. | |
# | |
@@ -3252,9 +3252,10 @@ | |
java_version=`$JAVA -version 2>&1 | sed -n -e 's/^java version[^0-9"]*"\([^"]*\)"/\1/p'` |
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
% Breadth-first search with a list of possible destinations (picks the closest first.) | |
bfs(Dests, [[Target,Path,Cost]|_], Target, Path, Cost):- member(Target, Dests). | |
bfs(Dests, [[N,P,C]|Queue], Target, Path, Cost):- | |
setof([Child,Pp,Cp], child(N, P, C, Child, Pp, Cp), Children), | |
append(Queue, Children, NextQueue), | |
bfs(Dests, NextQueue, Target, Path, Cost). | |
child(N0, P0, C0, N, P, C):- | |
arc(N0, N, Len), | |
append(P0, [N], P), | |
C is C0 + Len. |
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
// Move windows between monitors, taken from jakemcc's config | |
function moveToScreen(win, screen) { | |
if (!screen) { | |
return; | |
} | |
var frame = win.frame(); | |
var oldScreenRect = win.screen().frameWithoutDockOrMenu(); | |
var newScreenRect = screen.frameWithoutDockOrMenu(); |
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
local events = hs.uielement.watcher | |
watchers = {} | |
function init() | |
appsWatcher = hs.application.watcher.new(handleGlobalAppEvent) | |
appsWatcher:start() | |
-- Watch any apps that already exist | |
local apps = hs.application.runningApplications() |
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
--- === windowtracker === | |
--- Track all windows on the screen. | |
--- | |
--- You can watch for the following events: | |
--- * windowtracker.windowCreated: A window was created. | |
--- * windowtracker.windowDestroyed: A window was destroyed. | |
--- * windowtracker.mainWindowChanged: The main window was changed. This is usually the same as the | |
--- focused window, except for helper dialog boxes like file open windows and the like, which are | |
--- not reported by this event. | |
--- * windowtracker.windowMoved: A window was moved. |
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
def _expand_items(items): | |
return '\n'.join(items) | |
def _msb_project(*items): | |
return ("""<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ItemGroup Label="ProjectConfigurations"> | |
<ProjectConfiguration Include="Debug|Win32"> | |
<Configuration>Debug</Configuration> |
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
Running `rustc --crate-name core src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=dc98e8200778de86 -C extra-filename=-dc98e8200778de86 --out-dir /Users/tyler/code/rust/rust-core-template/target/debug/deps -C incremental=/Users/tyler/code/rust/rust-core-template/target/debug/incremental -L dependency=/Users/tyler/code/rust/rust-core-template/target/debug/deps` | |
error[E0282]: type annotations needed | |
--> src/iterator.rs:25:16 | |
| | |
25 | val == LoopState::Continue(()) | |
| ^^^^^^^^^^^^^^^^^^^ cannot infer type for `B` | |
error: aborting due to previous error | |
For more information about this error, try `rustc --explain E0282`. |
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
#[lang = "sized"] | |
#[fundamental] | |
pub trait Sized { | |
} | |
pub trait Clone : Sized { | |
fn clone(&self) -> Self; | |
} | |
#[lang = "copy"] |
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
var observer: Observer! | |
func stuff() { | |
guard let database = UserDefaults.init(suiteName: "com.apple.spaces") else { | |
fatalError("cannot read spaces data") | |
} | |
print(String(describing: database.object(forKey: "SpacesDisplayConfiguration"))) | |
observer = Observer(object: database) | |
} | |
class Observer: NSObject { |
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
var win: NSWindow! | |
func makeWindow() { | |
let rect = NSRect(x: 1000, y: 1000, width: 400, height: 300) | |
win = NSWindow(contentRect: rect, styleMask: .borderless, backing: .buffered, defer: false) | |
win.center() | |
win.level = .floating | |
win.hasShadow = false | |
win.backgroundColor = NSColor.clear | |
win.animationBehavior = .none | |
win.ignoresMouseEvents = true |
OlderNewer