例文を組み込んだAlfred Workflowを作りました: Alfred Git Commit Message Example
以下転載:
style: | |
@for src in $(SOURCES) ; do \ | |
echo "Formatting $$src..." ; \ | |
clang-format -i "$(SRC_DIR)/$$src" ; \ | |
clang-tidy -checks='-*,readability-identifier-naming' \ | |
-config="{CheckOptions: [ \ | |
{ key: readability-identifier-naming.NamespaceCase, value: lower_case },\ | |
{ key: readability-identifier-naming.ClassCase, value: CamelCase },\ | |
{ key: readability-identifier-naming.StructCase, value: CamelCase },\ | |
{ key: readability-identifier-naming.FunctionCase, value: camelBack },\ |
/** | |
* Returns a hash code for a string. | |
* (Compatible to Java's String.hashCode()) | |
* | |
* The hash code for a string object is computed as | |
* s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] | |
* using number arithmetic, where s[i] is the i th character | |
* of the given string, n is the length of the string, | |
* and ^ indicates exponentiation. | |
* (The hash value of the empty string is zero.) |
以下転載:
function hexToHSL(hex) { | |
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); | |
r = parseInt(result[1], 16); | |
g = parseInt(result[2], 16); | |
b = parseInt(result[3], 16); | |
r /= 255, g /= 255, b /= 255; | |
var max = Math.max(r, g, b), min = Math.min(r, g, b); | |
var h, s, l = (max + min) / 2; | |
if(max == min){ | |
h = s = 0; // achromatic |
nyagos.completion_hook = function (c) | |
local bs = { | |
"submodules", | |
"add", | |
}; | |
if c.text:match('^git ') then | |
for b in nyagos.eval('git branch'):gmatch('[^ \n*>-/]+') do | |
table.insert(bs, b); | |
end |
class FileOperator | |
# constant | |
BACKUP_DIR_NAME = "bak" | |
NO_OVERWRITE = "false" | |
PATH_SEPARATOR = "/" | |
EXTENSION_SEPARATOR = "." | |
REVISION_INIT = 2 | |
# fields |
// Browser Prefixes | |
@mixin transform($transforms) { | |
-webkit-transform: $transforms; | |
-moz-transform: $transforms; | |
-ms-transform: $transforms; | |
transform: $transforms; | |
} | |
// Rotate | |
@mixin rotate ($deg) { |
# Author: @c_piekarski | |
import optparse | |
import csv | |
import logging | |
import os | |
import datetime | |
import re | |
TAGS = ["Browser","Dalvikvm", "Zygote", "AndroidRuntime"] | |
SUBTAGS = [ |
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"os" |
Atom.prototype.startEditorWindow = function() { | |
var CommandInstaller, dimensions, maximize, resourcePath, safeMode, _ref; | |
_ref = this.getLoadSettings(), resourcePath = _ref.resourcePath, safeMode = _ref.safeMode; | |
CommandInstaller = require('./command-installer'); | |
CommandInstaller.installAtomCommand(resourcePath, false, function(error) { | |
if (error != null) { | |
return console.warn(error.message); | |
} | |
}); | |
CommandInstaller.installApmCommand(resourcePath, false, function(error) { |