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
ARG USER=nobody | |
# build image | |
FROM golang:1.21-alpine AS builder | |
ENV PATH="/go/bin:${PATH}" | |
ENV CGO_ENABLED=1 | |
ENV GOOS=linux | |
ENV GOARCH=amd64 |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" | |
) |
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 | |
systemctl stop snapd && systemctl disable snapd && systemctl mask snapd && \ | |
apt purge snapd -y && \ | |
rm -fr ~/snap /snap /var/snap /var/lib/snapd /var/cache/snapd /usr/lib/snapd |
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 | |
SIZE="$1" | |
FILE="/var/swap.img" | |
SWPS=10 | |
CHPR=50 | |
if [ -z "$SIZE" ]; then | |
echo "first argument must be size (fallocate -l)" | |
exit |
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
<?php | |
/** | |
* Script for bumping semantic versioned packages to git remote | |
* | |
* @version 0.1.0 | |
* @author Lajos Bencz <lazos@lazos.me> | |
* @license MIT | |
*/ | |
if (!is_dir('.git')) { |
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 Phalcon\Session\AdapterInterface; | |
use Phalcon\Cache\Backend\Redis as RedisCache; | |
use Phalcon\Cache\Frontend\None as FrontendNone; | |
class Redis implements \SessionHandlerInterface, AdapterInterface | |
{ | |
const SESSION_ACTIVE = 2; | |
const SESSION_NONE = 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 | |
# amdgpu-pro-wizard.sh | |
# Downloads and installs latest AMDGPU-PRO drivers from the official AMD website | |
URL="http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx" | |
DIR="/tmp/.amdgpu-pro-install-9811a15y85p71m/" | |
HTML="list.html" | |
PAT="www2.ati.com/drivers/linux" | |
REF="http://support.amd.com" |
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
<?php | |
class ProgressBar | |
{ | |
const NL = PHP_EOL; | |
/** Pattern used to match placeholders in message formats */ | |
const PATTERN_FORMAT = "/%(?'name'[^\\s%:]+)(:(?'format'[^%]+))?%/"; | |
/** Default format for progress update message */ |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.2.2.min.js" integrity="sha256-36cp2Co+/62rEAAYHLmRCPIych47CvdM+uTBJwSzWjI=" crossorigin="anonymous"></script> | |
<script> | |
$(function(){ | |
$('#add_default').click(function(){ | |
$('#list').append($('<li><a>Default</a></li>')); | |
}); | |
$('#add_clickable').click(function(){ | |
$('#list').append($('<li><a class="clickme">Clickable</a></li>')); |
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
<?php | |
interface TaskInterface | |
{ | |
/** | |
* Assign the first number | |
* @param int $value | |
* @return $this | |
*/ | |
public function setA($value); |
NewerOlder