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
#!/bin/bash | |
set -eo pipefail | |
cd ${0%/*} | |
if [[ -z "$1" ]]; then | |
echo "usage: $0 <orgname>" | |
exit 1 | |
fi | |
ORG="$1" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<metadata xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="1"> | |
<package type="rpm"> | |
<name>ant</name> | |
<arch>noarch</arch> | |
<version epoch="0" ver="1.9.4" rel="2.el7"/> | |
<checksum type="sha256" pkgid="YES">cebf5d3ec728967cc39e78a659aec88053847a9e18c92eedc025ea2ca7cc5a1b</checksum> | |
<summary>Build tool for java</summary> | |
<description>Ant is a platform-independent build tool for java. It's used by apache | |
jakarta and xml projects.</description> |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
git "github.com/libgit2/git2go/v30" | |
) |
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
Benchmarking `ArrayList` vs `LinkedList` for insert first, insert to the middle, insert last operations. | |
Operation measurement unit is nanosecond per 100 operations. | |
``` | |
Benchmark (size) (type) Mode Cnt Score Error Units | |
ListBench.insertFirst 100 arraylist avgt 15 1755.624 ± 49.597 ns/op | |
ListBench.insertFirst 100 linkedlist avgt 15 823.829 ± 32.518 ns/op | |
ListBench.insertFirst 1000 arraylist avgt 15 13943.465 ± 426.562 ns/op | |
ListBench.insertFirst 1000 linkedlist avgt 15 2034.035 ± 81.772 ns/op |
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
#!/bin/bash | |
set -e | |
for j in $(find $PWD -type f -name '*.java'); do | |
sed -i '/^\/\*/{:a;N;/\*\//!ba};/MIT License/d' $j | |
echo "removed old license: $j" | |
rm -f tmp | |
cp $1 tmp | |
cat $j >> tmp | |
rm $j |
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
" ~/.vimrc by github.com/g4s8 | |
" Unicode | |
scriptencoding utf-8 | |
" Not compatible with vi | |
set nocompatible | |
" Syntax detection | |
syntax on | |
" Highlight search | |
set hlsearch |
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
// some kind of web app | |
class WebApp extends HttpWebApp { | |
WebApp() { | |
// creating new file object for composing with read and write handlers | |
this(new File("/tmp/1")); | |
} | |
// composition? | |
WebApp(File file) { | |
super( |
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
package wtf.g4s8.qabot; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.AsynchronousFileChannel; | |
import java.nio.channels.CompletionHandler; | |
import java.nio.file.Paths; | |
import java.util.Collections; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.concurrent.Executors; |
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
mvn clean test -e | |
[INFO] Error stacktraces are turned on. | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ----------------------------< wtf.g4s8:oot >---------------------------- | |
[INFO] Building wtf.g4s8:oot 0.1.0 | |
[INFO] --------------------------------[ jar ]--------------------------------- | |
[INFO] | |
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ oot --- | |
[INFO] Deleting /home/projects/github.com/g4s8/oot/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
time="2019-08-13T17:58:48.588153999+03:00" level=warning msg="Error while setting daemon root propagation, this is not generally critical but may cause some functionality to not work or fallback to less desirable behavior" dir=/var/lib/docker error="error writing file to signal mount cleanup on shutdown: open /var/run/docker/unmount-on-shutdown: no such file or directory" | |
time="2019-08-13T17:58:48.596328706+03:00" level=info msg="libcontainerd: started new containerd process" pid=29571 | |
time="2019-08-13T17:58:48.596347619+03:00" level=info msg="parsed scheme: \"unix\"" module=grpc | |
time="2019-08-13T17:58:48.596353744+03:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc | |
time="2019-08-13T17:58:48.596377400+03:00" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}]" module=grpc | |
time="2019-08-13T17:58:48.596385564+03:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc | |
tim |
NewerOlder