lsof -i :8080 | awk '{l=$2} END {print l}' | xargs kill
comm -23 <(seq "$FROM" "$TO") <(ss -tan | awk '{print $4}' | cut -d':' -f2 | grep "[0-9]\{1,5\}" | sort | uniq) | shuf | head -n "$HOWMANY"
from github import Github | |
import re | |
import time | |
TOKEN = "ghp_..." | |
dependencies = [ | |
["vehicle-api.version" ,"1.0.2-8177-0927ca8" ] | |
] |
#!/usr/bin/env ruby | |
# modified from https://gist.github.com/pbock/3ab260f3862c350e6b5f # | |
require 'watir-webdriver' | |
class BurgerBot | |
def initialize | |
@attempt_count = 0 |
# Configuration file for runtime kernel parameters. | |
# See sysctl.conf(5) for more information. | |
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
# an explanation about some of these parameters, and instructions for | |
# a few other tweaks outside this file. | |
# See evil packets in your logs. | |
net.ipv4.conf.all.log_martians = 1 |
source ~/.vim_runtime/vundle_plugins | |
set runtimepath+=~/.vim_runtime | |
set number | |
set relativenumber | |
source ~/.vim_runtime/vimrcs/basic.vim | |
source ~/.vim_runtime/vimrcs/filetypes.vim |
lsof -i :8080 | awk '{l=$2} END {print l}' | xargs kill
comm -23 <(seq "$FROM" "$TO") <(ss -tan | awk '{print $4}' | cut -d':' -f2 | grep "[0-9]\{1,5\}" | sort | uniq) | shuf | head -n "$HOWMANY"
package com.example.kpcat; | |
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; | |
import org.jasypt.encryption.StringEncryptor; | |
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; | |
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; | |
import org.springframework.boot.CommandLineRunner; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.context.annotation.Bean; |
public class UniqueRandomNumberGeneratorImplV2 implements UniqueRandomNumberGenerator { | |
private SecureRandom random; | |
@Autowired | |
public UniqueRandomNumberGeneratorImplV2(SecureRandom random) { | |
this.random = random; | |
} | |
@Override |
import requests | |
services = ( | |
("http://httpbin.org/get", 'POST'), | |
("http://httpbin.org/get", 'POST'), | |
("http://httpbin.org/get", 'POST'), | |
("http://httpbin.org/get", 'POST'), | |
("http://httpbin.org/get", 'POST'), | |
("http://httpbin.org/get", 'POST') | |
) |
#!/usr/bin/env python | |
import urllib2 | |
import json | |
url = "http://localhost:8080/api/metrics" | |
res = urllib2.urlopen(url).read() | |
json_res= json.loads(res) | |
print json_res['threads'] |
def sourceProps = new Properties() | |
def destProps = new Properties() | |
def diffProps = new Properties() | |
file("source.properties").withInputStream { sourceProps.load(it) } | |
file("dest.properties").withInputStream { destProps.load(it) } | |
task diff { | |
doFirst { | |
def sourceKeys = sourceProps.stringPropertyNames(); |