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
open System | |
//input = ["world", "10", "4", "hello", "1"] | |
// | |
//output = sort_strings(input) | |
// | |
//assert output == ["hello", "1", "4", "world", "10"] | |
[<EntryPoint>] | |
let main argv = |
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
Diagram( | |
NonTerminal('PREFIX'), | |
Choice(0, | |
Sequence( | |
Terminal('segmentation'), | |
NonTerminal('segmentation-class'), | |
), | |
Sequence( | |
Terminal('change'), | |
Choice(0, NonTerminal('change-class'), Skip()), |
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
git clone http://github.com/account/repo.git repo-public | |
cd repo-public | |
git log -1 | |
git rev-list --max-parents=0 HEAD #find HEAD hash | |
git reset --soft 8b03e62214e143b9409e76376ce9afb240d6418e | |
git status | |
git commit --amend -m "Squashed public version 2018-06-09" | |
git remote add public | |
git remote add public https://github.com/public_account/repo-public.git | |
git push public master --force-with-lease |
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 /dev/null > ~/.bash_history && history -c && exit |
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
#TabsToolbar { visibility: collapse !important; } | |
/* to hide the sidebar header */ | |
#sidebar-header { | |
visibility: collapse; | |
} | |
/* move nav panel in slightly to prevent covering macOS window | |
controls */ | |
#nav-bar-customization-target { |
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
import urllib2 | |
for x in range(0,4): | |
for y in range(0,4): | |
response = urllib2.urlopen('http://marathon-photo.ru/members/image.php?id=1087583&x1='+str(x*100)+'&x0=0&y1='+str(y*66.5)+'&y0=0&z=4&width=400&height=266') | |
with open('image'+str(x)+str(y)+'.jpg', 'wb') as output: | |
output.write(response.read()) |
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
using System; | |
using Common.Logging; | |
namespace PLC | |
{ | |
/// <summary> | |
/// Simple wrapper/adapter over ILog for fine-grained testing | |
/// </summary> | |
/// <remarks> | |
/// If you have a lot of objects of some type and want to narrow logging |
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] [Reflection.Assembly]::LoadWithPartialName("System.Messaging") | |
[System.Messaging.MessageQueue]::GetPrivateQueuesByMachine("LOCALHOST") | % {".\" + $_.QueueName} | % {[System.Messaging.MessageQueue]::Delete($_); } | |
echo "All MSMQ queues deleted" |
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
public class BookDAO : DAOBase<IBook, Book>{ | |
<...> | |
} |
NewerOlder