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 { readdirSync, statSync, readFileSync, writeFileSync, readSync, openSync, closeSync } = require('node:fs'); | |
const { join, extname, relative } = require('node:path'); | |
const { execSync } = require('node:child_process'); | |
const { argv, exit } = require('node:process'); | |
const DEFAULT_IGNORE_PATHS = new Set([ | |
'.git', '.gitignore', '.dockerignore', 'node_modules', 'dist', 'build', '.next', | |
'.env', '.env.local', '.env.production.local', '.env.development.local', |
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
FROM alpine | |
RUN apk --no-cache add ncdu | |
COPY . /tmp/context | |
ENTRYPOINT ncdu /tmp/context |
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
FROM alpine:latest | |
RUN apk update && apk upgrade && \ | |
apk add --no-cache \ | |
openssh | |
RUN mkdir -p /keys/web /keys/worker | |
CMD ssh-keygen -t rsa -f /keys/web/tsa_host_key -N '' && \ | |
ssh-keygen -t rsa -f /keys/web/session_signing_key -N '' && \ |
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
------------------------------------------------------------------------------- | |
-- HTTP Accept-Language header handler -- | |
-- @originalAuthor: [email protected] -- | |
-- @originalRepository: https://github.com/fghibellini/nginx-http-accept-lang-- | |
-- @modifiedBy: [email protected] -- | |
-- @gist: https://gist.github.com/mauron85/47ed1075262d9e020fe2 -- | |
-- @license: MIT -- | |
-- @requires: -- | |
-- @description: -- | |
-- returns language with greatest quality -- |
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'; | |
var retryForever = true; | |
var retryTimeout = 5000; | |
exports = module.exports = function ($http, $q, $timeout) { | |
function httpRetry () { | |
var args = arguments; | |
var httpPromise = $http.apply(null, args); |
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
server { | |
listen 80; | |
return 444; | |
} |
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
// Recursively include files and convert paths to camelCase | |
var bulk = require('bulk-require'); | |
exports = module.exports = bulk(__dirname, ['./!(index|_*|*.spec).js']); | |
Object.keys(exports).forEach(function (key) { | |
var camelCased = key; | |
camelCased = camelCased.replace(/-([a-z])/g, function (g) { | |
return g[1].toUpperCase(); | |
}); | |
if (camelCased !== key) { | |
exports[camelCased] = exports[key]; |
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
--- | |
- name: trying to create a directory that requires sudo | |
file: | |
state=directory | |
path=/helloworld | |
# sudo should not be required there! | |
- name: removing it | |
file: | |
state=absent |
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
description "<description here>" | |
author "<[email protected]>" | |
start on filesystem or runlevel [2345] | |
stop on shutdown | |
# Automatically Respawn: | |
respawn | |
respawn limit 3 5 |
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
// credits to: http://stackoverflow.com/questions/3199588/fastest-way-to-convert-javascript-nodelist-to-array | |
function toArray (nl) { | |
var l=nl.length, arr = new Array(l); | |
while(l--){arr[l]=nl[l];} | |
return arr; | |
} |
NewerOlder