Skip to content

Instantly share code, notes, and snippets.

View yarnaimo's full-sized avatar

yamaimo yarnaimo

View GitHub Profile
@u1tnk
u1tnk / image magick fill resize
Created April 18, 2011 13:13
ImageMagickで指定サイズで空白を埋める。
convert input.jpg -resize 1024x1024\> -size 1024x1024 xc:white +swap -gravity center -composite output.jpg
@leommoore
leommoore / node_file_paths.markdown
Last active July 21, 2023 13:50
Node - File Paths

#Node - File Paths

##File Paths Node has a path module which can be used to manipulate paths.

###Normalizing Paths Paths can be stored in different ways and it is neccessary to ensure that the path is standardized.

var path = require('path');
path.normalize('/foo/bar//baz/asdf/quux/..');
@jmblog
jmblog / gist:6077993
Last active November 22, 2021 08:37
所得税と住民税の計算方法

所得税(国税)

所得税の計算方法

所得税額 = (所得金額(A) - 所得控除額(B)) × 税率 - 税額控除額(C)

  • 「所得金額(A)- 所得控除額(B)」は 課税所得金額 といい、1,000円未満の端数を切り捨てる。

所得税の税率

@s-panferov
s-panferov / result.ts
Created November 19, 2014 14:11
Result type in TypeScript
interface Result<T, E> {
map<U>(fn: (a: T) => U): Result<U, E>;
mapErr<U>(fn: (a: E) => U): Result<T, U>;
isOk(): boolean;
isErr(): boolean;
ok(): Option<T>;
err(): Option<E>;
and<U>(res: Result<U,E>): Result<U,E>;
andThen<U>(op: (T) => Result<U,E>): Result<U,E>;
@miyakogi
miyakogi / nim_syntax.md
Last active April 30, 2023 07:24
Syntax of Nim
@cucmberium
cucmberium / gist:e687e88565b6a9ca7039
Last active February 28, 2024 01:23
Twitterの検索API & Twitterでの検索術

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません

@iwozzy
iwozzy / GoogleCloudStorage.js
Last active February 16, 2022 04:13
Google Cloud Storage with Node.js
var Promise = require('bluebird');
var GoogleCloudStorage = Promise.promisifyAll(require('@google-cloud/storage'));
var storage = GoogleCloudStorage({
projectId: 'PROJECT_ID',
keyFilename: 'keyfile.json'
})
var BUCKET_NAME = 'my-bucket'
// https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/0.39.0/storage/bucket
@rob0tca
rob0tca / batch_ocr.gs
Created September 28, 2017 04:54
Google Apps script for performing OCR on all JPEGS found in the specified Drive folder. Extracts text to a Google sheet, where it's mapped to the JPEG's filename.
function extractTextOnOpen() {
//ADD YOUR VALUES BELOW
var folderName = "[YOUR PROJECT FOLDER]";
var sheetId = "[YOUR SHEET ID]";
//Define folder
var folder = DriveApp.getFoldersByName(folderName).next();
var folderId = folder.getId();

権限一覧

  1. サーバー関係
    • 管理者
      • すべての権限を持ち、各チャンネルの権限を無視できる
    • サーバーログの表示
      • サーバー設定のサーバーログにアクセスできる
    • サーバー管理
      • サーバー名の変更と地域の変更ができる(サーバー設定の概要かな)
    • 役職管理
  • 役職の追加や自分以下の権限を編集、削除できる
@oiami
oiami / mock-storage.js
Created August 15, 2018 15:37 — forked from nfarina/mock-storage.js
Mock Google Cloud Storage for JS
//
// Quick & Dirty Google Cloud Storage emulator for tests. Requires
// `stream-buffers` from npm. Use it like this:
//
// `new MockStorage().bucket('my-bucket').file('my_file').createWriteStream()`
//
class MockStorage {
buckets: {[name: string]: MockBucket};