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
sudo -s | |
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | |
dnf install -y yum-utils | |
dnf install -y https://yum.puppetlabs.com/puppet-release-el-8.noarch.rpm | |
dnf install -y https://download.simp-project.com/simp-release-community.rpm | |
dnf install -y simp |
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
import argparse | |
import warnings | |
class DeprecateAction(argparse.Action): | |
def __call__(self, parser, namespace, values, option_string=None): | |
warnings.warn("Argument %s is deprecated and is *ignored*." % self.option_strings) | |
delattr(namespace, self.dest) | |
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
>>> b"Added in d0b1708f".hex() | |
'416464656420696e206430623137303866' |
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 & SIGNATURE | |
Signature (minus some options you don't need): | |
find [starting-point...] [expression] | |
GNU find searches the directory tree rooted at each given `starting-point` by | |
evaluating the given `expression` from left to right. | |
If no `starting-point` is specified, `.` is assumed. |
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 greet(person: string) { | |
return "Hello, " + person; | |
} | |
console.log(greet("you")); | |
console.log(greet([1, 2, 3])); |
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
module.exports = { | |
"extends": [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/eslint-recommended" | |
], | |
"parser": "@typescript-eslint/parser", | |
"plugins": [ | |
"@typescript-eslint" | |
], | |
}; |
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 | |
{ | |
grep -rlE '^#!\s?/(usr/)?bin/(env\s+)?(sh|bash|fish|zsh)' . | |
find . -type f \( -iname "*.bash" -o -iname "*.sh" -o -iname "*.zsh" -o -iname "*.fish" \) | |
} | tr "\n" " " | uniq |
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 python:3.8-slim-buster | |
ARG DJANGO_VERSION='3.*' | |
ARG PROJECT_NAME='project' | |
ARG APP_NAME='app' | |
RUN set -ex \ | |
&& python3 -m pip install --upgrade --no-cache-dir pip "Django==${DJANGO_VERSION}" \ | |
&& django-admin startproject ${PROJECT_NAME} \ | |
&& cd ${PROJECT_NAME} || exit 1 \ |
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 ubuntu:bionic | |
ENV LANG C.UTF-8 | |
RUN which pip || true | |
RUN set -ex \ | |
&& apt-get update -y \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
wget \ | |
ca-certificates \ |
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 python2 | |
"""Backport of Python 3.8 subprocess for 2.7 with improvements.""" | |
from __future__ import print_function | |
__all__ = ("run",) | |
from subprocess import PIPE, Popen as _Popen27 |
NewerOlder