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
#ifndef RESULT_H_ | |
#define RESULT_H_ | |
// Includes | |
#include <stdbool.h> | |
#include <stdint.h> | |
// Macros | |
#define RESULT_TEMPLATE(name, typeOk, typeErr) \ | |
typedef struct name { \ |
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/bash | |
# | |
# Author: SuperPaintman <[email protected]> | |
# | |
database_name="my_awesome_database" | |
psql -Atq "$database_name" <<SQL | psql -Atq "$database_name" | |
SELECT 'SELECT ' || |
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
syntax setd = (ctx) => { | |
const dummy = #`dummy`.get(0); | |
let result = #``; | |
ctx.expand('expr'); | |
ctx.reset(); | |
const selectors = []; |
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
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"`); | |
} |
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/bash | |
# | |
# Author: SuperPaintman <[email protected]> | |
# | |
# Export | |
# Init | |
me=$(basename "$0") |
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/bash | |
# | |
# Author: SuperPaintman <[email protected]> | |
# | |
# Init | |
me=$(basename "$0") | |
RETVAL=0 | |
env_name_token="GITLAB_PRIVATE_TOKEN" |
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
escape_json () { | |
echo "${1//$'\n'/\\n}" | sed 's/\\/\\\\/g' | sed 's/\\\\n/\\n/g' | sed 's/"/\\"/g' | sed "s/'/\\'/g" | |
} |
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/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 }')" |
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/bash | |
RETVAL=0 | |
if [ -z "$1" ]; then | |
echo "Usage: build <bin_name>" | |
exit 1 | |
fi | |
bin_name="$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
#!/bin/bash | |
# | |
# Author: SuperPaintman <[email protected]> | |
# | |
### | |
# Constants | |
### | |
RETVAL=0 |
NewerOlder