This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir icon.iconset | |
sips -z 16 16 Icon1024.png --out icon.iconset/icon_16x16.png | |
sips -z 32 32 Icon1024.png --out icon.iconset/[email protected] | |
sips -z 32 32 Icon1024.png --out icon.iconset/icon_32x32.png | |
sips -z 64 64 Icon1024.png --out icon.iconset/[email protected] | |
sips -z 128 128 Icon1024.png --out icon.iconset/icon_128x128.png | |
sips -z 256 256 Icon1024.png --out icon.iconset/[email protected] | |
sips -z 256 256 Icon1024.png --out icon.iconset/icon_256x256.png | |
sips -z 512 512 Icon1024.png --out icon.iconset/[email protected] | |
sips -z 512 512 Icon1024.png --out icon.iconset/icon_512x512.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// breakdown by type (ruleId) | |
module.exports = function (results) { | |
const processed = results | |
.filter((result) => result.messages.length > 0) | |
.map((result) => result.messages.map((item) => item.ruleId)) | |
.flat(); | |
const filtered = processed.reduce((acc, val) => { | |
acc[val] = acc[val] === undefined ? 1 : (acc[val] += 1); | |
return acc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only print filenames | |
module.exports = function (results) { | |
return results | |
.filter((result) => result.messages.length > 0) | |
.map((result) => result.filePath.split('/')[3]) | |
.flat() | |
.reduce((acc, val) => { | |
acc[val] = acc[val] === undefined ? 1 : (acc[val] += 1); | |
return acc; | |
}, {}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import subprocess | |
packages = { | |
'package_name': re.compile(r'Name: (?P<package_name>.*)\n'), | |
'version': re.compile(r'Version: (?P<version>.*)\n'), | |
'url': re.compile(r'Home-page: (?P<url>.*)\n'), | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Exports Issues from a specified repository to a CSV file | |
Uses basic authentication (Github username + password) to retrieve Issues | |
from a repository that username has access to. Supports Github API v3. | |
Derived from https://gist.github.com/unbracketed/3380407 | |
""" | |
import csv | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Exports Issues from a specified repository to a CSV file | |
Uses basic authentication (Github username + password) to retrieve Issues | |
from a repository that username has access to. Supports Github API v3. | |
""" | |
import csv | |
import requests | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//credit to elias-zamaria | |
const numberWithCommas = (x) => { | |
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Borrowed from pieces around the internet and customized. | |
function makeID() { | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
for (var i = 0; i < 4; i++) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text.toUpperCase(); | |
} |