This file contains hidden or 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
| tell application "System Events" to tell process "Mail" | |
| set mainWindow to a reference to the first window | |
| set rootSplitter to a reference to the first splitter group of the mainWindow | |
| set firstSplitter to a reference to the last splitter group of the rootSplitter | |
| set scrollArea to a reference to the last scroll area of the firstSplitter | |
| set scrollGroup to a reference to the first group of the scrollArea | |
| if number of groups of the scrollGroup is greater than 1 then | |
| set maybeRemoteContentGroup to a reference to the first group of the scrollGroup | |
This file contains hidden or 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
| from ctypes import CDLL | |
| loginPF = CDLL('/System/Library/PrivateFrameworks/login.framework/Versions/Current/login') | |
| result = loginPF.SACLockScreenImmediate() |
This file contains hidden or 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
| #!/bin/vbash | |
| # CONFIG | |
| wan=dhcp | |
| lan=192.168.1.1 | |
| lan_segment=192.168.1.0 | |
| vpn_segment=192.168.5.0 | |
| domain=apertoire.org | |
| lease_start=192.168.1.200 | |
| lease_stop=192.168.1.245 |
This file contains hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "net/url" | |
| "os" | |
| "regexp" | |
| "sort" | |
| "strconv" |
This file contains hidden or 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 Cocoa | |
| struct Person { | |
| var name: String = "John" | |
| var age: Int = 50 | |
| var dutch: Bool = false | |
| var address: Address? = Address(street: "Market St.") | |
| } | |
| struct Address { |
This file contains hidden or 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
| // | |
| // main.m | |
| // wwcd15sessionlister | |
| // | |
| // Created by Steven Troughton-Smith on 10/06/2015. | |
| // | |
| #import <Foundation/Foundation.h> | |
| int main(int argc, const char * argv[]) { |
This file contains hidden or 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 basic format of the `ssh-keygen` command is something like this: | |
| # ssh-keygen -t TYPE -f FILENAME -C "COMMENT" | |
| ## Here's What I Used | |
| ssh-keygen -t rsa -f id_rsa_prompt_iphone5s -C "TJ Luoma iPhone 5s" | |
This file contains hidden or 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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| die "Usage: rename <expression> <files>\n" unless (@ARGV >= 2); | |
| my $op = eval 'sub { ' . shift . ' }'; # crazily dangerous - type carefully! | |
| die $@ if $@; |
This file contains hidden or 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
| // | |
| // Copyright (c) 2014 Cédric Luthi “0xced” | |
| // | |
| // ./uncruftapidiff https://developer.apple.com/library/prerelease/ios/releasenotes/General/iOS80APIDiffs/index.html iOS8_0APIDiffs.html | |
| // ./uncruftapidiff https://developer.apple.com/library/prerelease/mac/documentation/General/Reference/APIDiffsMacOSX10_10SeedDiff/index.html OSX10_10APIDiffs.html | |
| // | |
| #import <Foundation/Foundation.h> | |
| #import <sysexits.h> |
This file contains hidden or 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
| ################################################################# | |
| # = This script transfers bash history to zsh history | |
| # = Change bash and zsh history files, if you don't use defaults | |
| # | |
| # = Usage: ruby bash_to_zsh_history.rb | |
| # | |
| # = Author: Ankit Goyal | |
| ################################################################# | |
| # change if you don't use default values |