Aleksandr Krivoshchekov SuperPaintman
-
Yandex
- Russia, Moscow
- Sign in to view email
- https://superpaintman.com/
View result.h
#ifndef RESULT_H_ | |
#define RESULT_H_ | |
// Includes | |
#include <stdbool.h> | |
#include <stdint.h> | |
// Macros | |
#define RESULT_TEMPLATE(name, typeOk, typeErr) \ | |
typedef struct name { \ |
View postgresql_fixing_sequences.sh
#!/bin/bash | |
# | |
# Author: SuperPaintman <SuperPaintmanDeveloper@gmail.com> | |
# | |
database_name="my_awesome_database" | |
psql -Atq "$database_name" <<SQL | psql -Atq "$database_name" | |
SELECT 'SELECT ' || |
View sweet.setd.sjs.js
syntax setd = (ctx) => { | |
const dummy = #`dummy`.get(0); | |
let result = #``; | |
ctx.expand('expr'); | |
ctx.reset(); | |
const selectors = []; |
View abstract-class.js
export class AbstractClass { | |
constructor(constructor, name) { | |
if (!name) { | |
name = constructor.name; | |
} | |
if (this.constructor === AbstractClass) { | |
throw new Error(`Cannot create an instance of the abstract class "AbstractClass"`); | |
} |
View mongodb_git_backup_export.sh
#!/bin/bash | |
# | |
# Author: SuperPaintman <SuperPaintmanDeveloper@gmail.com> | |
# | |
# Export | |
# Init | |
me=$(basename "$0") |
View create_default_gl_labels.sh
#!/bin/bash | |
# | |
# Author: SuperPaintman <SuperPaintmanDeveloper@gmail.com> | |
# | |
# Init | |
me=$(basename "$0") | |
RETVAL=0 | |
env_name_token="GITLAB_PRIVATE_TOKEN" |
View escape_json.sh
escape_json () { | |
echo "${1//$'\n'/\\n}" | sed 's/\\/\\\\/g' | sed 's/\\\\n/\\n/g' | sed 's/"/\\"/g' | sed "s/'/\\'/g" | |
} |
View add_swap.sh
#!/bin/bash | |
if [[ $(swapon -s) != "" && $(swapon -s | wc -l) != 0 ]]; then | |
echo "Swap already created" | |
exit 1 | |
fi | |
SWAP_FILENAME="/swapfile" | |
mem_size="$(free | grep -i 'mem:' | awk '{ print $2 }')" |
View build_love2d.sh
#!/usr/bin/bash | |
RETVAL=0 | |
if [ -z "$1" ]; then | |
echo "Usage: build <bin_name>" | |
exit 1 | |
fi | |
bin_name="$1" |
View docker-letsencrypt-renew.sh
#!/bin/bash | |
# | |
# Author: SuperPaintman <SuperPaintmanDeveloper@gmail.com> | |
# | |
### | |
# Constants | |
### | |
RETVAL=0 |
NewerOlder