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
$ gpt -r show disk0 | |
start size index contents | |
0 1 PMBR | |
1 1 Pri GPT header | |
2 32 Pri GPT table | |
34 6 | |
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B | |
409640 1951845952 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC | |
1952255592 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC | |
1953525128 7 |
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
tell application "iTunes" | |
set currentTrack to current track | |
set userPlaylists to {} | |
repeat with currentPlaylist in user playlists | |
set playlistName to name of currentPlaylist | |
if currentPlaylist is not smart then | |
if special kind of currentPlaylist is none then | |
copy (playlistName as string) to the end of userPlaylists |
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
-- | |
-- RemoveDuplicates - remove duplicate tracks in an iTunes playlist | |
-- Anders Bergh <anders1@gmail.com>, May 2012 | |
-- Public Domain | |
-- | |
tell application "iTunes" | |
set fi to fixed indexing | |
set fixed indexing to true | |
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
$ ipconfig getv6packet en1 | |
DHCPv6 REPLY (7) Transaction ID 0x55156a Length 84 | |
Options[3] = { | |
CLIENTID (1) Length 14 DUID ... Addr 3c:07:54:26:99:ee <<< | |
SERVERID (2) Length 14 DUID ... Addr 54:e6:fc:e5:76:25 | |
IA_NA (3) Length 40 IA_NA ... Options[1] = { | |
IAADDR (5) Length 24 IAADDR 2001:db8::1 ... 86400 Valid=86400 | |
} | |
} |
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
$ gpt -r show disk0 | |
start size index contents | |
0 1 PMBR | |
1 1 Pri GPT header | |
2 32 Pri GPT table | |
34 6 | |
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B | |
409640 1951845952 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC | |
1952255592 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC | |
1953525128 7 |
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
set month_list to {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"} | |
set current_date to current date | |
set current_month to 1 * (month of current_date) | |
set current_year to (year of (current date)) | |
set playlist_name to "" & current_year & "-" & (item current_month of month_list) | |
tell application "iTunes" | |
try | |
set pl_monthly to playlist playlist_name | |
on error |
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
CAVEATS | |
There are limits to what you can do in the child process. To be totally | |
safe you should restrict yourself to only executing async-signal safe | |
operations until such time as one of the exec functions is called. All | |
APIs, including global data symbols, in any framework or library should | |
be assumed to be unsafe after a fork() unless explicitly documented to be | |
safe or async-signal safe. If you need to use these frameworks in the | |
child process, you must exec. In this situation it is reasonable to exec | |
yourself. |
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
#!/usr/bin/env luajit | |
-- Original source code at: | |
-- http://www.opensource.apple.com/source/DarwinTools/DarwinTools-1/sw_vers.c | |
local ffi = require 'ffi' | |
local CF = require 'CoreFoundation' | |
ffi.cdef[[ | |
CFDictionaryRef _CFCopyServerVersionDictionary(void); | |
CFDictionaryRef _CFCopySystemVersionDictionary(void); |
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
class throttle(object): | |
""" | |
Decorator that prevents a function from being called more than once every | |
time period. | |
To create a function that cannot be called more than once a minute: | |
@throttle(minutes=1) | |
def my_fun(): | |
pass |
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
4902 execve("./test", ["./test"], 0x7fffd3b0a338 /* 23 vars */) = 0 | |
4902 arch_prctl(ARCH_SET_FS, 0x5605d0) = 0 | |
4902 sched_getaffinity(0, 8192, [0, 1, 2, 3]) = 64 | |
4902 mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f09977f0000 | |
4902 mmap(0xc000000000, 67108864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000 | |
4902 mmap(0xc000000000, 67108864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xc000000000 | |
4902 mmap(NULL, 33554432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f09957f0000 | |
4902 mmap(NULL, 2162688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f09955e0000 | |
4902 mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f09955d0000 | |
4902 clock_gettime(CLOCK_MONOTONIC, {tv_sec=10123, tv_nsec=347148300}) = 0 |
OlderNewer