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
<!DOCTYPE html> | |
<title>Scale Circles Generator</title> | |
<meta charset=utf-8> | |
<style> | |
canvas { | |
border: 1px solid #eee; | |
} | |
</style> | |
<body> | |
<canvas width="500" height="500"></canvas> |
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
function merge (into, object) { | |
Object | |
.keys(object) | |
.forEach(k => { | |
let val = object[k] | |
if (val){ | |
if (Array.isArray(val)) { | |
into[k] = [].concat(into[k] || [], val) | |
} | |
else if (typeof val === 'object') { |
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 bash | |
from=./images | |
into=./fixed | |
quality=60 # percent | |
find $from -type f -name "*.jpg" | while IFS= read -r jpg; do | |
mkdir -p "$( | |
dirname "$into"/"$jpg" | |
)" |
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 j2p; | |
import japa.parser.JavaParser; | |
import japa.parser.ParseException; | |
import japa.parser.ast.CompilationUnit; | |
import japa.parser.ast.ImportDeclaration; | |
import japa.parser.ast.PackageDeclaration; | |
import japa.parser.ast.body.BodyDeclaration; | |
import japa.parser.ast.body.ClassOrInterfaceDeclaration; | |
import japa.parser.ast.body.FieldDeclaration; |
OlderNewer