A Pen by Mathias Leppich on CodePen.
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
| [ | |
| {log_levels,[{connection, error}]} | |
| ]. |
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
| #!/bin/bash | |
| sudo apt-get update | |
| sudo apt-get install nginx -y | |
| echo ' | |
| resolver 172.16.0.23; # AWS DNS Server | |
| resolver_timeout 5s; | |
| upstream search { | |
| server search-YOUR-ENDPOINT-HERE.us-east-1.cloudsearch.amazonaws.com:80; |
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
| <?php | |
| class A { | |
| function create() { | |
| return new static(); | |
| } | |
| } | |
| class B extends A { | |
| } |
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
| #!/bin/bash | |
| /usr/local/bin/marked "$@" \ | |
| | sed \ | |
| -e 's!\[\ \]!<input type="checkbox" onclick="return false" onkeydown="return false">!' \ | |
| -e 's!\[[.\-]\]!<input type="checkbox" onclick="return false" onkeydown="return false" indeterminate>!' \ | |
| -e 's!\[[√xX]\]!<input type="checkbox" onclick="return false" onkeydown="return false" checked>!' \ | |
| | awk '{print;if($0~/indeterminate/)found=1;}END{if(found)print "<script>window.addEventListener(\"load\",function(){var arr=document.querySelectorAll(\"input[type=checkbox][indeterminate]\");for(i in arr)arr[i].indeterminate=true;});</script>"}' | |
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
| Scenario: Repost a 3D Post | |
| Given there is user A | |
| And there is user B following user A | |
| And there is user C following user B | |
| And there is user D following user A and B | |
| And user A posted a photo P1 | |
| And user A posted a 3D photo P2 | |
| When user B reposted P2 as P3 | |
| Then the feeds should be like: | |
| | feed | of | count | contains | because | |
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
| /* github style diff colors */ | |
| .diff .file .diffcontent .lines, | |
| .diff .file .diffcontent .lineno { | |
| font-family: Consolas, "Liberation Mono", Courier, monospace; | |
| font-size: 13px; | |
| line-height: 18px; | |
| text-shadow: 0 1px 0 rgba(255,255,255,0.25); | |
| background-color: #fff; | |
| } |
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
| var commonPrefix = function(a, b) { | |
| if (a === b) return a; | |
| var i = 0; | |
| while (a.charAt(i) == b.charAt(i))++i; | |
| return a.substring(0, i); | |
| } | |
| var commonSuffix = function(a, b) { | |
| if (a === b) return ""; | |
| var i = a.length - 1, | |
| k = b.length - 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
| $mem->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true); | |
| $mem->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT); | |
| != | |
| $mem->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT); | |
| $mem->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true); |
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
| #!/bin/bash | |
| # | |
| # The MIT License (MIT) | |
| # | |
| # Copyright (c) 2013 Mathias Leppich <mleppich@muhqu.de> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |