Skip to content

Instantly share code, notes, and snippets.

@gaogao-9
gaogao-9 / CanvasRenderingContext2D.js
Created June 9, 2016 19:09
キャンバスのやつ
const drawHueCircle = Symbol("drawHueCircle");
const drawSVRect = Symbol("drawSVRect");
Object.defineProperties(CanvasRenderingContext2D.prototype, {
[drawHueCircle]: {
value(x, y, rIn, rOut, splitNum=180){
// 描画半径を計算で求める
const r = 2 * rOut;
// 直前のスタイル情報のバックアップ
const oldStrokeStyle = this.strokeStyle;
@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>
@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"
@mala
mala / gist:fad5e0bc8a82a9c0fc9d
Last active December 29, 2016 18:02
AFNetworking 2.5.2 以下の脆弱性について

未修正のアプリが数多く残っている状態なので、パブリックな場所での言及には注意して下さい

未修正のアプリが数多く残っている状況ですが、すでに広く情報が公開されており、2.5.2で修正されたという情報が広まると混乱が生じるため広く周知する次第です。

問題と経緯

AFNetworking 2.5.1 にMITM攻撃を許す脆弱性があり、2.5.2で修正された、 と報道されていますが、これは誤りです。

@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:

@will3942
will3942 / kvm.sh
Last active October 12, 2016 18:18
Running OS X under QEMU/KVM
git clone git://git.kernel.org/pub/scm/virt/kvm/kvm.git
git clone git://git.kiszka.org/kvm-kmod.git
cd kvm-kmod
./configure
make LINUX=../kvm clean sync all
modprobe -r kvm_intel
cp ./x86/kvm*.ko /lib/modules/$(uname -r)/kernel/arch/x86/kvm/
modprobe kvm_intel
@s-aska
s-aska / Aska.css
Last active August 29, 2015 14:02
LimeChat Theme
html {
font-family: "Menlo";
background-color: #272822;
color: white;
word-wrap: break-word;
margin: 0;
padding: 3px 4px 10px 4px;
font-size: 12px;
}
@Terminus-IMRC
Terminus-IMRC / dmesg
Created May 15, 2014 04:18
Weird UPD packet from unknown IP addr
[325522.454454] UDP: short packet: From 119.81.7.18:53 15099/41 to 192.168.0.6:42855
[345447.772801] UDP: short packet: From 119.81.7.18:53 15099/41 to 192.168.0.6:21332
[345457.753895] UDP: short packet: From 119.81.7.18:53 15099/41 to 192.168.0.6:21332
  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>
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes: