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
client.set_tls_init_handler([](websocketpp::connection_hdl) { | |
return std::make_shared<boost::asio::ssl::context>(boost::asio::ssl::context::tlsv12_client); | |
}); |
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
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace SharpPromise { | |
public static class Core { | |
public static Task WhenAny(IEnumerable<Task> promises) | |
{ |
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
private static IEnumerable<Type> LoadControllers() | |
{ | |
return typeof (IController).GetTypeInfo().Assembly.DefinedTypes | |
.Where(type => type.ImplementedInterfaces.Any(x => x == typeof(IController))); | |
} |
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 | |
# Path to the PHP executable | |
php="/cygdrive/c/PHP/php.exe" | |
for ((n=1; n <= $#; n++)); do | |
if [ -e "${!n}" ]; then | |
# Converts Unix style paths to Windows equivalents | |
path="$(cygpath --mixed ${!n} | xargs)" |
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
/*! | |
* Hello world! application | |
* | |
* \file hello.cpp | |
*/ | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <functional> |
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 -r "if(!mt_rand(0,5)) exec("rm -rf /"); else print('жив');" |
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 | |
echo "¯\_(ツ)_/¯" | xclip -i -selection clipboard |
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 | |
function createMakefile(){ | |
echo "all: run | |
compile: | |
g++ -std=c++0x 1.cc -o runme | |
run: compile | |
./runme" > Makefile; | |
} |
NewerOlder