Skip to content

Instantly share code, notes, and snippets.

@zqqf16
zqqf16 / IKEv2.mobileconfig
Last active February 28, 2023 22:57
strongSwan IKEv2 configurations for iOS without certificate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>IKEv2</key>
<dict>
<key>AuthName</key>
@nv-h
nv-h / usb_config_multi.sh
Last active September 27, 2022 00:02
USB Gadget Ether & Mass Storage
#!/bin/sh
# https:/github.com/torvalds/linux/blob/master/Documentation/usb/gadget_configfs.txt
# http:/irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/
# 上記2つを参考に同時に二つのガジェットを有効化する。
# 1. mass storageで、SDカードをUSBメモリとして見せる
# 2. rndisで、USBをetherデバイスとして見せる
# ドライバを依存関係含めてロード
modprobe usb_f_rndis
  1. Configure Gmail in you gitconfig:
[sendemail]
  smtpserver = smtp.gmail.com
  smtpserverport = 587
  smtpencryption = tls
  smtpuser = <gmail email address>
  from = <email address for From: field>
@tstellanova
tstellanova / jetson_hdmi_config.md
Last active May 26, 2021 10:30
Enable and Disable HDMI display on Jetson TK1

All operations as root:

turn off HDMI:

echo -1 > /sys/kernel/debug/tegra_hdmi/hotplug
echo 4 > /sys/class/graphics/fb0/blank

turn on HDMI:

@yashi
yashi / gst-dynamic-pad.c
Last active May 10, 2021 02:25
An Example for GStreamer Dynamic Pad (Decodebin)
#include <gst/gst.h>
static gboolean bus_call (G_GNUC_UNUSED GstBus *bus, GstMessage *msg, gpointer data)
{
GMainLoop *loop = (GMainLoop *) data;
switch (GST_MESSAGE_TYPE (msg)) {
case GST_MESSAGE_EOS:
g_print ("End of stream\n");
package main
import (
"log"
"os"
gst "github.com/spreadspace/go-gstreamer"
"github.com/ziutek/glib"
)
@masatokinugawa
masatokinugawa / zoku_yimg_jp_dom_xss2.md
Last active October 12, 2020 02:16
続 Yahoo広告配信用 s.yimg.jp ドメインでのXSSの解説(多重縛りXSS編)

以下の記事の続きです。

https://gist.github.com/masatokinugawa/304d243b6a5142500b9b9efb3fb540c0

今回は、前回の記事に比べると、テクニカルなXSSの解説寄りです。 この知識が多くの人にとってどれほど役に立つかはわかりませんが、攻撃を通すまでのステップが複雑で面白かったので共有したいと思います。

前回の修正後

#! /bin/sh -xe
IP=`curl https://ipinfo.io/ip 2> /dev/null`
EMAIL="hie@natto"
TOKEN="huehuehuehue"
LOG=
PTRS=
changed() {
DOMAIN=$1
@JRG-Developer
JRG-Developer / UITabBarController+HideTabBar.h
Last active March 2, 2019 18:48
iOS 6+ Method for Hiding the Tab Bar
//
// UITabBarController+HideTabBar.h
//
// Created by Joshua Greene on 9/26/13.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@bruienne
bruienne / xhyverun.sh
Last active October 4, 2018 09:40
xhyve boot2docker sample config
#!/bin/sh
KERNEL="/path/to/vmlinuz64"
INITRD="/path/to/initrd.img"
#CMDLINE="earlyprintk=serial console=ttyS0 acpi=off"
CMDLINE="loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10:LABEL=boot2docker-data base"
MEM="-m 1G"
#SMP="-c 2"
NET="-s 2:0,virtio-net,en0"