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
// data | |
{ | |
"_id" : ObjectId("5f4f03709f80fb9179d5136e"), | |
"data1" : 1.0, | |
"data2" : 2.0, | |
"data3" : 3.0, | |
"data4" : 4.0, | |
"data5" : 5.0, | |
"other" : { | |
"data6" : 6.0, |
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
# spark-env.sh | |
export SPARK_DIST_CLASSPATH=$(hadoop classpath) |
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
===================================== | |
pseudo distribution | |
===================================== | |
# hadoop-env.sh | |
export JAVA_HOME=/home/hadoop/app/java | |
# core-site.xml | |
<configuration> | |
<property> |
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
<?php // <?php is required | |
// helper | |
if (!function_exists('separator')) { | |
function separator($tag = 'TAG') | |
{ | |
echo '------------ ' . $tag . ' ------------' . PHP_EOL; | |
} | |
} |
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
# directory & file | |
app // include Console, Events, Exceptions, Http (Controllers/Middleware), Jobs, Listeners, Models, Providers | |
bootstrap/app.php // instantiate lumen application | |
config // default: vendor/laravel/lumen-framework/config (include app.php, auth.php, logging.php ...) | |
public/index.php // there is a .htaccess in the same level | |
routes/web.php | |
vendor // dependencies | |
.env // after loaded, get by function env($key, $default = null) | |
artisan // #!/usr/bin/env php | |
composer.json // like npm package.json |
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
#define _GNU_SOURCE | |
#include <sys/wait.h> | |
#include <sys/wait.h> | |
#include <sched.h> | |
#include <stdio.h> | |
#include <signal.h> | |
#include <unistd.h> | |
#define STACK_SIZE (1024 * 1024) |
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
# rvm | |
rvm list // list installed interpreters | |
rvm list known // list available interpreters | |
rvm install <version> // install ruby interpreter | |
rvm use <version> // switch to specified ruby interpreter | |
rvm remove <version> // remove ruby interpreter (alias: delete) | |
rvm get <version> // upgrade rvm: stable, master | |
ls -al ~/.rvm/ | |
# ruby |
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
# base | |
cri (container runtime interface) | |
cni (container network interface) | |
csi (container storage interface) | |
ipvs (ip virtual server) | |
oci (open container initiative) | |
nfs (network file system) | |
=> ref: https://zhuanlan.zhihu.com/p/33390023 | |
=> ref: https://www.youtube.com/watch?v=Qw-6k95IBHU |
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
# .net standard | |
=> ref: https://github.com/dotnet/standard/blob/master/docs/versions.md | |
=> ref: https://github.com/dotnet/standard/tree/master/docs/versions | |
# .net framework | |
v4.8 is recommended | |
=> ref: https://dotnet.microsoft.com/download/dotnet-framework | |
# .net core | |
v3.1 is LTS |
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
[ApiController] | |
[Route("api/[controller]/[action]")] | |
public class AsyncController : ControllerBase | |
{ | |
[HttpGet] | |
public async void Test() | |
{ | |
Console.WriteLine("thread id: {0}", Thread.CurrentThread.ManagedThreadId); | |
await new HttpClient().GetAsync("https://www.google.com/"); |
OlderNewer