Skip to content

Instantly share code, notes, and snippets.

package example;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import org.junit.Test;
public class CompletableFutures {
@Test
public void chainFuturesInner() throws ExecutionException, InterruptedException {
System.out.println("Executing chainFuturesInner()");
@welvet
welvet / shell.sh
Last active March 1, 2018 17:25
my shell
#!/bin/sh
echo ENTER SHELL NAME:
read SHELL_NAME
#zsh
sudo apt-get install -y git zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
sudo chsh -s /bin/zsh `whoami`
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="blinks"
#ZSH_THEME="bureau"
import urllib2
import json
import StringIO
import time
import gzip
from threading import Thread, Lock
url = """http://ya.ru"""
cnt = [0, 0]
import RPi.GPIO as GPIO
import time
import serial
def power_gsm():
print("powering on")
try:
GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.OUT)
GPIO.output(11, GPIO.HIGH)
ant cppunit gmp isl011 libtool mpfr2 scons
autoconf emacs gmp4 jpeg libyaml node sqlite
autojump fasd go libevent mackup openssl ssh-copy-id
automake freetype gradle libgpg-error maven pkg-config wget
cloog gcc groovy libksba memcached ppl011 xz
cloog-ppl015 gcc46 httpie libmpc mercurial readline
cloog018 gdb imagemagick libmpc08 mongodb rtmpdump
cmake git isl libpng mpfr ruby
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
#ZSH_THEME="arrow"
public class ExcludeIters {
static List<Long> origin = Lists.newArrayList(11l,7l,5l,4l,3l,1l, 0l);
static List<Long> exclude = Lists.newArrayList(7l,6l,3l,1l);
static List<Long> expected = Lists.newArrayList(11l, 5l, 4l,0l);
public static void main(String[] args) {
final Iterator<Long> origni = origin.iterator();
final Iterator<Long> excludei = exclude.iterator();
Iterator<Long> result = new Iterator<Long>() {
import 'dart:mirrors';
@MirrorsUsed(
targets: const [
'angular.core',
'angular.core.dom',
'angular.core.parser',
'angular.routing'
],
metaTargets: const [
NgInjectableService,
00000 58 51 48 20 01 00 00 00--41 55 54 48 2E 52 4D 2E |XQH ....AUTH.RM.|
00010 54 4F 2E 49 53 54 45 53--54 20 20 20 20 20 20 20 |TO.ISTEST |
00020 20 20 20 20 20 20 20 20--20 20 20 20 20 20 20 20 | |
00030 20 20 20 20 20 20 20 20--49 53 54 45 53 54 20 20 | ISTEST |
00040 20 20 20 20 20 20 20 20--20 20 20 20 20 20 20 20 | |
00050 20 20 20 20 20 20 20 20--20 20 20 20 20 20 20 20 | |
00060 20 20 20 20 20 20 20 20--4D 44 20 20 01 00 00 00 | MD ....|
00070 00 00 00 00 08 00 00 00--FF FF FF FF 00 00 00 00 |........����....|
00080 11 01 00 00 B8 04 00 00--4D 51 48 52 46 32 20 20 |....�...MQHRF2 |
00090 04 00 00 00 01 00 00 00--41 4D 51 20 43 45 52 54 |........AMQ CERT|