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
$ tmux list-sessions | |
no server running on /tmp/tmux-1000/default | |
$ tmux new-session -d -s TmuxTestSession | |
$ tmux list-sessions | |
0: 1 windows (created Wed Nov 9 13:49:04 2016) [80x23] | |
TmuxTestSession: 1 windows (created Wed Nov 9 13:49:04 2016) [239x66] |
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
[vagrant w]$ composer install -vvv | |
Reading ./composer.json | |
Loading config file ./composer.json | |
Executing command (CWD): git describe --exact-match --tags | |
Executing command (CWD): git branch --no-color --no-abbrev -v | |
Executing command (CWD): hg branch | |
Executing command (CWD): svn info --xml | |
Failed to initialize global composer: Composer could not find the config file: /home/vagrant/.composer/composer.json | |
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section | |
Loading plugin Wikimedia\Composer\MergePlugin |
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
curl -X GET https://query.wikidata.org/sparql \ | |
--data-urlencode "format=json&query='CONSTRUCT ?s <http://example.org/onto/dummypred> ?o WHERE { ?s ?p ?o } LIMIT 100'" -H 'Accept:text/plain' \ | |
> data/testquery.nt |
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 | |
curl -X GET https://query.wikidata.org/sparql \ | |
--data-urlencode "format=json&query='CONSTRUCT ?s <http://example.org/onto/dummypred> ?o WHERE { ?s ?p ?o } LIMIT 100'" -H 'Accept:text/plain' \ | |
> data/testquery.nt |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"os/exec" | |
"sync" | |
) | |
func main() { |
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
package main | |
import ( | |
"fmt" | |
"math" | |
"runtime" | |
"strings" | |
) | |
const ( |
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
#!/usr/bin/env python3.5 | |
# Adapted from J.F. Sebastian's answer at http://stackoverflow.com/a/34027086/340811 | |
import asyncio | |
import sys | |
from asyncio.subprocess import PIPE, STDOUT | |
async def get_lines(shell_command): | |
p = await asyncio.create_subprocess_shell(shell_command, stdin=PIPE, stdout=PIPE, stderr=STDOUT) | |
return (await p.communicate())[0].splitlines() |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"os/exec" | |
"sync" | |
) | |
func main() { |
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
defmodule Exmultiproc do | |
for _ <- 1..500 do | |
cmd = "sleep 3600" | |
IO.puts "Starting another process ..." | |
Port.open({:spawn, cmd}, [:exit_status, :stderr_to_stdout]) | |
end | |
System.cmd("sleep", ["3600"]) | |
end |
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
package main | |
import ( | |
"fmt" | |
"os/exec" | |
"sync" | |
) | |
func main() { | |
wg := new(sync.WaitGroup) |