Skip to content

Instantly share code, notes, and snippets.

View shinout's full-sized avatar
🏠
Working from home

Shin Suzuki shinout

🏠
Working from home
View GitHub Profile
@azu
azu / git-2.26.1-README.md
Last active January 22, 2022 21:54
Gitの認証情報を奪い取れるGit 2.26.0以下にある脆弱性について

Git 2.26.0以下にある脆弱性

Git 2.26.0以下*1には、細工したリポジトリをgit cloneしたときに、 そのユーザーのCredential(たとえばGitHub.comをcloneするときに使う認証情報)を奪い取れる脆弱性があります。

📝 取得できる認証情報は credential.helper の設定に依存する

既にPoC(検証するためのコード)もあり、結構簡単なので是非Gitを2.26.1以上にアップデートしましょう。 git submoduleを使うと見た目ではわかりにくい攻撃もできるので、「気をつける」では回避は難しいです。

爽健美茶 十六茶 からだ巡り茶
ドクダミ
熊笹
杜仲茶
はすの葉
クコ葉
みかんの皮
高麗人参
霊芝
@Gozala
Gozala / Readme.md
Last active March 19, 2020 15:09
WTF Flow ?

WTF Flow

[Flow][] static type checker is a wonderful attempt to bring [algebric data types][] to JS. It is still fairly new project and there for has few WTFs that can pull you down the rabbit hole. This document is attempt to document things that may seem like a WTF from the perspective of JS developer who tries to employ static type checker, or in other words, some items on the list may be very subjective & based on the background of the writer.

Polymorphic type that is a function

It is very likely that one will wind up using [Polymorphic functions][] to solve a more general problem. And if you define type alias for such a function you may be puzzled what is the right syntax should be used for such type definition.

Let's start with:

@flackend
flackend / colors.bash
Last active November 12, 2018 21:06
echo colors cheatsheet
#!/bin/sh -e
for attr in $(seq 0 1); do
for fg in $(seq 30 37); do
for bg in $(seq 40 47); do
printf "\033[$attr;${bg};${fg}m$attr;$fg;$bg\033[m "
done
echo
done
done
@danielgtaylor
danielgtaylor / gist:0b60c2ed1f069f118562
Last active April 2, 2024 20:18
Moving to ES6 from CoffeeScript

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.

Punctuation

Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

@ryugoo
ryugoo / ti_install.sh
Created September 21, 2014 14:28
Install Titanium 3.4.0.RC
# http://builds.appcelerator.com.s3.amazonaws.com/index.html#3.4.0
# RC2
ti sdk install http://builds.appcelerator.com/mobile/3.4.0/mobilesdk-3.4.0.RC2-osx.zip
# RC1
ti sdk install http://builds.appcelerator.com/mobile/3.4.0/mobilesdk-3.4.0.RC-osx.zip
var stream = require('stream');
function streamify(text) {
var s = new stream.Readable();
s.push(text);
s.push(null);
return s;
}
streamify('foo\n').pipe(process.stdout);
@ympbyc
ympbyc / FunctionalJs.md
Last active April 26, 2023 12:26
Functional JavaScript

Functional JavaScript

2013 Minori Yamashita ympby@gmail.com

-- ここにあなたの名前を追記 --

目次

@ryugoo
ryugoo / stylus.jmk.js
Last active December 11, 2015 17:49
Stylus to Alloy JMK
var fs = require("fs");
var path = require("path");
var util = require("util");
var styl = require("stylus");
var wrench = require("wrench");
function compileTSS(root, view) {
var data = fs.readFileSync(path.join(root, view), "utf8"),
tss;
styl.render(data, function (err, css) {
@jasonm23
jasonm23 / xterm-256color.svg
Last active February 11, 2024 12:33
Xterm 256color mode color chart, organised into sections. (used on Wikipedia/xterm)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.