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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| # on fedora-like, you must use the downloadable package of vagrant | |
| # available on hashi corp website. | |
| # The per distrib provided package wont provide winrm support.. | |
| # see https://www.vagrantup.com/downloads.html |
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
| #!/bin/bash | |
| for file in ./inp/*.jpg | |
| do | |
| outfile=`basename $file .jpg`.png | |
| echo "convert \"$file\" -fuzz 3% -transparent \"#ffffff\" \"./out/$outfile\"" | |
| done > script.txt | |
| /usr/local/Cellar/graphicsmagick/1.3.30/bin/gm batch -echo on -feedback on script.txt |
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
| 0.0.0.0:8080 | |
| gzip | |
| ext .html | |
| root ./dist | |
| log / stdout "{combined}" | |
| rewrite { | |
| to {path} {path}/ / | |
| } |
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
| server { | |
| listen 80 default_server; | |
| server_name /var/www/example.com; | |
| root /var/www/example.com; | |
| index index.html index.htm; | |
| location ~* \.(?:manifest|appcache|html?|xml|json)$ { | |
| expires -1; | |
| # access_log logs/static.log; # I don't usually include a static log |
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
| https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/ |
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
| <template> | |
| <div> | |
| <!-- <div> | |
| <input v-model="page" type="number" /> | |
| </div> --> | |
| <canvas ref="canvas" width="800" height="600"></canvas> | |
| </div> | |
| </template> |
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
| function groupFilters (selectedFilters) { | |
| return selectedFilters.reduce((r, v) => { | |
| const k = Object.keys(v)[0]; | |
| if (Array.isArray(v[k])) { | |
| if (!r[k]) { | |
| r[k] = v[k]; | |
| return r; | |
| } | |
| r[k] = r[k].concat(v[k]); | |
| return r; |
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
| package main | |
| import ( | |
| "image/jpeg" | |
| "log" | |
| "os" | |
| "github.com/nfnt/resize" | |
| ) |
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
| package main | |
| import "fmt" | |
| type EnumTest struct { | |
| Code string | |
| Message string | |
| } | |
| var ErrMyKindOfError EnumTest = EnumTest{"CODE_TEST", "For my kind of error, this is a message"} |
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
| package main | |
| import "fmt" | |
| type Item interface{} | |
| type Product struct { | |
| ID int | |
| Name string | |
| } |
NewerOlder