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
| EAPI 5 | |
| inherit [ autotools-utils ] | |
| DESCRIPTION "A toolkit to assist in profiling applications in a domain specific way" | |
| HOMEPAGE "https://github.com/rib/UProf" | |
| SRC_URI "https://github.com/rib/UProf/archive/${PV}.tar.gz -> ${P}.tar.gz" | |
| SLOT 0 | |
| LICENSE [ GPL-2 ] |
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
| public class Application : Gtk.Window { | |
| public Application () { | |
| this.title = "Zaebis"; | |
| this.window_position = Gtk.WindowPosition.CENTER; | |
| this.destroy.connect (Gtk.main_quit); | |
| this.set_default_size (170, 70); | |
| Gtk.Button button = new Gtk.Button.with_label ("Make everything zaebis"); | |
| this.add (button); | |
| button.clicked.connect (() => { | |
| button.label = "Everything is zaebis now"; |
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
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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
| int main() { | |
| <:]<%}; | |
| <:]<%%>; | |
| [:>{%>; | |
| [:><%}; | |
| [:><%%>; | |
| <:??)<%??>; | |
| ??(:>{??>; | |
| return 0; | |
| } |
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
| unsafe { | |
| object stream = typeof(SerialPort).GetField("internalSerialStream", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(serialPort); | |
| var handle = (SafeFileHandle)stream.GetType().GetField("_handle", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(stream); | |
| COMMTIMEOUTS communications_timeouts; | |
| communications_timeouts.ReadIntervalTimeout = | |
| communications_timeouts.ReadTotalTimeoutConstant = | |
| communications_timeouts.ReadTotalTimeoutMultiplier = | |
| communications_timeouts.WriteTotalTimeoutConstant = | |
| communications_timeouts.WriteTotalTimeoutMultiplier = |
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
| set | |
| { | |
| if ((value < 0) && (value != -1)) | |
| { | |
| throw new ArgumentOutOfRangeException("ReadTimeout", SR.GetString("ArgumentOutOfRange_Timeout")); | |
| } | |
| if (this._handle == null) | |
| { | |
| InternalResources.FileNotOpen(); | |
| } |
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
| let (/>) f a = f a | |
| let source = | |
| (new DirectoryInfo(".")).GetFiles() | |
| |> Array.filter /> fun f -> ( f.Extension = ".fs" | |
| || f.Extension = ".fsx") | |
| type Relations = | |
| | opens = 0 | |
| | modules = 1 |
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
| run_cmd = !(cmd, args, done) -> | |
| spawn = require 'child_process' .spawn | |
| child = spawn cmd, args | |
| result = stdout: '' | |
| child.stdout | |
| ..on \data !(buffer) -> result.stdout += buffer | |
| ..on \end !-> done result | |
| <-! run_cmd \ls <[ ]> | |
| console |
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
| let (/>) f a = f a | |
| [1;2;3] | |
| |> Seq.iter /> fun z -> printf "%d" z // works | |
| [1;2;3] | |
| |> Seq.iter <| fun z -> printf "%d" z // <- doesn't work |
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
| let ° msg = System.Console.WriteLine( msg.ToString() ) | |
| let ◄ = 5 | |
| let ★ x = x + ◄ | |
| let (-★-) x y = x + y | |
| let © = "© 2013" | |
| let ► = | |
| fun x -> 2 + x |