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
| <script> | |
| function sync() { | |
| var m = document.getElementById("main"); | |
| var s = document.getElementById("sub"); | |
| s.value = m.value; | |
| window.setTimeout( function() { | |
| s.focus(); | |
| s.selectionStart = m.selectionStart; | |
| s.selectionEnd = m.selectionEnd; |
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 javax.script.*; | |
| public class Script | |
| { | |
| public static void main(String args[]) | |
| { | |
| ScriptEngineManager m = new ScriptEngineManager(); | |
| Session s1 = new Session(m); | |
| Session s2 = new Session(m); |
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
| # Configuring Tagged-VLAN on Cisco 2960 series. | |
| C2960S-02#conf t | |
| Enter configuration commands, one per line. End with CNTL/Z. | |
| C2960S-02(config)#interface gigabitethernet0/1 | |
| C2960S-02(config-if)#switchport mode access | |
| C2960S-02(config-if)#switchport access vlan 2000 | |
| C2960S-02(config-if)#end |
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
| /Applications/VLC.app/Contents/MacOS/VLC --intf=dummy "http://camadmin:[email protected]/nphMotionJpeg?Resolution=640x480&Quality=Clarity&Framerate=30" --sout=file/raw:/Path/To/Dir/hogehoge.raw |
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
| boundary='--myboundary' | |
| ct = 'Content-type:' | |
| cl = 'Content-length:' | |
| no = 1 | |
| File.open(ARGV[0], 'r'){|f| | |
| while(true) | |
| length = 0 | |
| # skip to boundary. |
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
| void capture(int dispId) { | |
| NSLog(@"Start capturing."); | |
| CGImageRef imageRef = CGDisplayCreateImage(dispId); | |
| NSLog(@"End"); | |
| NSURL *fileURL = [NSURL fileURLWithPath:[@"~/Desktop/screenshot.png" stringByExpandingTildeInPath]]; | |
| CGImageDestinationRef destination = CGImageDestinationCreateWithURL((__bridge CFURLRef)fileURL, kUTTypePNG , 1, NULL); | |
| CGImageDestinationAddImage(destination, imageRef, NULL); |
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 | |
| // Screenshot | |
| // | |
| // Created by Hideki KONDO on 2014/06/14. | |
| // Copyright (c) 2014年 Hideki KONDO. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| #import <AppKit/AppKit.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
| /* | |
| * glGrab.c | |
| * Found in http://lists.apple.com/archives/cocoa-dev/2005/Aug/msg00901.html | |
| * Line 186 has a fix for Intel processors: http://lists.apple.com/archives/quartz-dev/2006/May/msg00100.html | |
| */ | |
| /* | |
| IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in | |
| consideration of your agreement to the following terms, and your use, installation or modification | |
| of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, |
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
| # http://pivotallabs.com/enabling-os-x-screen-sharing-from-the-command-line/ | |
| sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false | |
| sudo launchctl load /System/Library/LaunchDaemons/com.apple.screensharing.plist |