Skip to content

Instantly share code, notes, and snippets.

@tkyowa
tkyowa / gist:1378694
Last active May 23, 2017 08:15
ruby-debugを使ったRuby・Railsアプリケーションのデバッグ方法

ruby-debugを使ったRuby・Railsアプリケーションのデバッグ方法

インストール

# Ruby 1.8系の場合
gem install ruby-debug

# Ruby 1.9系の場合
gem install debugger
@rinx
rinx / h-luatexja.tex
Last active October 6, 2017 04:15
markdownで書いた文書をbeamerに変換するときのメモ
\usepackage{luatexja}
\hypersetup{unicode=true}
@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"
@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
#! /bin/sh -xe
IP=`curl https://ipinfo.io/ip 2> /dev/null`
EMAIL="hie@natto"
TOKEN="huehuehuehue"
LOG=
PTRS=
changed() {
DOMAIN=$1
@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の解説寄りです。 この知識が多くの人にとってどれほど役に立つかはわかりませんが、攻撃を通すまでのステップが複雑で面白かったので共有したいと思います。

前回の修正後

package main
import (
"log"
"os"
gst "github.com/spreadspace/go-gstreamer"
"github.com/ziutek/glib"
)
@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");
@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:

  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>