This file contains 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
// reds | |
@material_red_50: #fde0dc; | |
@material_red_100: #f9bdbb; | |
@material_red_200: #f69988; | |
@material_red_300: #f36c60; | |
@material_red_400: #e84e40; | |
@material_red_500: #e51c23; | |
@material_red_600: #dd191d; | |
@material_red_700: #d01716; | |
@material_red_800: #c41411; |
This file contains 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
'use strict'; | |
const scripts = document.getElementsByTagName('script'); | |
const currentScript = scripts[scripts.length - 1]; | |
const baseURL = currentScript.src.substring(0, currentScript.lastIndexOf('/')); | |
module.exports = baseURL; |
This file contains 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
'use strict'; | |
/** | |
* @exports sizeFactory | |
* @private | |
* | |
* @param {{width: number, height: number}} size | |
* @returns {sizeHelper} | |
*/ | |
function sizeFactory(size) { |
This file contains 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
## Inspired by https://gist.github.com/Pencroff/69ebdd4d57ad11b2eaba | |
## file name transformation | |
## file-name => FileName | |
## Sources: | |
## http://stackoverflow.com/questions/6998412/velocity-string-function | |
## http://stackoverflow.com/questions/21288687/using-velocity-split-to-split-a-string-into-an-array-doesnt-seem-to-work | |
## http://velocity.apache.org/engine/releases/velocity-1.7/apidocs/org/apache/velocity/util/StringUtils.html#split(java.lang.String, java.lang.String) | |
## File and Code Templates -> Includes -> Save as "CamelCase" | |
#set( $camelCaseName = "" ) |
This file contains 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
package io.github.kribblo.ip; | |
import java.net.*; | |
import java.util.Collections; | |
public class SiteLocalIp { | |
public static String getSiteLocalIp() throws SocketException, UnknownHostException { | |
return Collections.list(NetworkInterface.getNetworkInterfaces()).stream() | |
.filter(SiteLocalIp::isValidInterface) | |
.flatMap(i -> Collections.list(i.getInetAddresses()).stream()) |
This file contains 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
#!/bin/sh | |
/usr/bin/find ~/Workspace -mindepth 1 -maxdepth 1 -type d -print -exec /usr/bin/git -C {} pull --ff-only --all \; |
This file contains 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
perl -pi -e 's/(width|height|margin-?\w*|padding-?\w*|font-size): ([\d+\.])(vw|vh|%|px)/"$1: ".sprintf("%.2f", $2*(1\/0.85)).$3/e' file.css |
This file contains 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
# Example: npm unpublish the-package from 0.5.31 to 0.5.41 | |
for i in $(seq 31 41); do npm unpublish "the-package@0.5.$i"; done | |
# list available versions of the-package: | |
npm show the-package versions |
This file contains 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
for i in {01..21}; do zip -j -r "ComicName$i.cbz" "Chapter$i"; done |
This file contains 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
#!/usr/bin/env node | |
const fs = require('fs'); | |
if(process.argv.length < 4) { | |
console.error('Usage:', 'node check-size.js file size'); | |
process.exit(1); | |
} | |
const file = process.argv[2]; |
OlderNewer