# drop in a function
fetch() { (echo -ne "GET $2 HTTP/1.0\r\nHost: $1\n\r\n"; sleep 5) | \
openssl s_client -connect $1:443 -quiet -msgfile /dev/null | \
perl -pe 'BEGIN { while (<>) { last if $_ eq "\r\n"; } }';
}
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 com.example; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.springframework.context.ApplicationContextInitializer; | |
import org.springframework.context.ApplicationListener; | |
import org.springframework.context.ConfigurableApplicationContext; | |
import org.springframework.context.event.ContextClosedEvent; | |
import org.springframework.core.env.MapPropertySource; |
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
startup_message off | |
term screen-256color | |
bind ',' prev | |
bind '.' next | |
screen -t t2 /bin/false | |
screen -t t1 bash | |
select 0 | |
kill |
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 com.example; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import java.util.HashSet; | |
import java.util.Set; | |
import org.junit.jupiter.api.Test; | |
public class TestHashCode |
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
// src/main/java/net/_95point2/clock/Clock.java | |
package net._95point2.clock; | |
import java.time.LocalDateTime; | |
public interface Clock | |
{ | |
public long millis(); | |
public LocalDateTime now(); | |
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
/** | |
* <dependency> | |
<groupId>com.yugabyte</groupId> | |
<artifactId>jdbc-yugabytedb</artifactId> | |
<version>42.2.7-yb-3</version> | |
</dependency> | |
*/ | |
package net.thingping.yb.core.cfg; | |
import java.util.ArrayList; |
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 | |
DIR="backup" | |
if [ $# -ne 3 ] | |
then | |
echo "" | |
echo " usage: ./init.sh <app> <rsync.net user_id> <rsync.net host>" | |
echo " <app> is a single word, no spaces, lower case application or backup set ID" |
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 | |
import os | |
import re | |
for dev in os.listdir('/sys/class/net'): | |
if os.path.isdir('/sys/class/net/' + dev + '/device'): | |
try: | |
print(re.search(' ([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})', os.popen('ip -br a show dev ' + dev).read()).groups()[0]) | |
except: |
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
// taken from here and made to work | |
// | |
var debug = false; | |
//var rgbaColor = 'rgba(1,12,123,0.33)'; | |
var rgbaColor = 'rgba(247, 224, 153, 0.247)'; | |
// var rgbaColor = '#999'; | |
// var rgbaColor = 'rgb(30, 20, 200)'; |