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
$ cat /etc/redhat-release #will show you information for red hat based distros. | |
$ cat /etc/SuSE-release #for SUSE based distros. | |
$ cat /etc/mandrake-release #for mandrake distros. | |
$ cat /etc/debian_version #for debian based distros. | |
$ cat /etc/UnitedLinux-release #might also return some more information. |
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
#!/bin/bash | |
BASE_DIR="$(pwd)"; | |
OWNER="${1}"; | |
if [ "${OWNER}" == "" ]; | |
then | |
OWNER=${USER} | |
fi; | |
curl -L "https://api.github.com/users/${OWNER}/repos" | grep '"name"' | cut -d \" -f 4 | while read repository; |
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
unticked_statement: | |
... | |
| T_SWITCH '(' expr ')' { zend_do_switch_cond(&$3 TSRMLS_CC); } switch_case_list { zend_do_switch_end(&$6 TSRMLS_CC); } | |
| ... | |
; | |
switch_case_list: | |
'{' case_list '}' { $$ = $2; } | |
| '{' ';' case_list '}' { $$ = $3; } | |
| ':' case_list T_ENDSWITCH ';' { $$ = $2; } |
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
void SaveFrame(ImageFrame frame) | |
{ | |
var filePath = frame.Timestamp.ToString() + ".bmp"; | |
using (var bitmap = new Bitmap(frame.Image.Width, frame.Image.Height, PixelFormat.Format32bppRgb)) | |
{ | |
var rect = new Rectangle(0, 0, bitmap.Width, bitmap.Height); | |
var data = bitmap.LockBits(rect, ImageLockMode.ReadWrite, bitmap.PixelFormat); | |
Marshal.Copy(frame.Image.Bits, 0, data.Scan0, frame.Image.Bits.Length); |
NewerOlder