Skip to content

Instantly share code, notes, and snippets.

@talkingmoose
talkingmoose / Generate Random Firmware Password.bash
Last active July 20, 2021 15:30
Generate a randome EFI firmware password for each Mac and store in Jamf Pro. Note: This will be completely visible to all Jamf Pro users whose permissions allow access to Computers. Create an extension attritute with the first script.
#!/bin/bash
function logresult() {
if [ $? = "0" ] ; then
echo "$1"
else
echo "$2"
exit 1
fi
}
@YoshihitoAso
YoshihitoAso / Positive_Negative.py
Created March 30, 2016 10:29
メール文章のポジネガ判定
#!/usr/local/bin/python
# -*- coding:utf-8 -*-
import json
import csv
import MeCab as mc
################################################
# メール文章のポジネガ判定
#
# Copyright 2016 YoshihitoAso(@y_asoh)
@kyohei-shimada
kyohei-shimada / capybara_memo.md
Last active February 12, 2023 23:49
Capybaraを使う上で気をつけること

Capybaraを使う上で気をつけること

アンチパターンとか,ハマりどころとか

expect(page).to have_content 'hogheoge'

expect(page).to have_content 'hogehoge'
@sunaot
sunaot / designing_class.md
Last active August 16, 2018 04:40
役割を閉じ込めてそれを名前で表現する (レビューコメントから)
  • 入力フォーマット
  • 登録処理の中でのデータモデル
  • 出力フォーマット

が分離していて、それがコード上の構造で表現されているのがよいと思います。 分離すると、どこかで結合しないといけないのでマッピングが発生します。 そこは互いのインターフェイスをどう解釈するかという表現なので明示的になっているほうがよいと思います。


ソフトウェア2段階認証

ソフトウェアトークン生成器による2段階認証(Two-factor authentication)の仕様と実装について。

2段階認証?2要素認証?

Googleではこの認証機能を 2-Step Verification と呼んでいる。一般的には Two-factor authentication、あるいは Multi-factor authentication と呼ばれている様子。

和訳の定義はまちまちだが、

@ARolek
ARolek / ImageMagick-Amazon-Linux.md
Last active February 10, 2023 00:07
Install ImageMagick from source on Amazon Linux

I needed a newer version of ImageMagick than is available on the yum packages on Amazon Linux. I tried using the remi repo but it failed with dependency errors. Here is what I did to install ImageMagick with support for PNG, JPG, and TIFF.

download the most recent package

wget http://www.imagemagick.org/download/ImageMagick.tar.gz

uncomress the package

@taea
taea / rm_pid.md
Last active January 12, 2023 14:22
postgres をちゃんと終了しないと.pidファイルが残っちゃって、Rails が起動しないもんだい

Rails 起動しようとするとこんなエラーでる

PG::ConnectionBad at /
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
@woowee
woowee / osx.sh
Created September 2, 2013 16:24
the source : mathiasbynens/dotfiles (https://github.com/mathiasbynens/dotfiles/blob/master/.osx)
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@tsupo
tsupo / Twitter_API_1.1_rate_limit.txt
Created May 17, 2013 05:12
Twitter API 1.1 / 実行回数制限
Twitter API 1.1 の現行APIの制限
(REST API v1.1 Limits per window by resource)
https://dev.twitter.com/docs/rate-limiting/1.1/limits
・15分辺り最大何回実行できるか
Timelines
GET statuses/mentions_timeline 15回
GET statuses/user_timeline 180回/user, 300回/application
@BlackKetchupTea512
BlackKetchupTea512 / sublimetext_default_settings.md
Created September 4, 2012 12:11
Sublime Text 2 のDefault設定ファイルについて

追記

この記事は古いです...。はてなブログの方に完全版を置いてあります。→ http://blue-ham-cake1024.hatenablog.com/entry/2012/09/07/Sublime_Text_2_のDefault設定ファイルを眺める


はてなブログは調子が悪いようなので。

この記事ではDefault設定ファイルにどのような記述がされているか、その記述にどんな意味があるかを一つ一つ見ていきます。実際に設定をカスタマイズしてみたい方は、メニューのPreferencesタブの"Settings - User"からUser設定ファイルを開いてそこでいろいろ試してみましょう。