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 | |
# Add User to Postfix/Dovecot | |
echo -n "Enter the new email address: " | |
read mail_user | |
echo -n "Enter the new password: " | |
read mail_pass | |
echo "Adding User to Postfix Virtual Mailboxes..."; |
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
var opentiles = []; | |
var tileId = 0; | |
var currentTiles = 0; | |
var maxTiles = 50; | |
var allTiles = []; | |
var tile_size = 20; | |
function boolRand(){ | |
return Math.random()<.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
import random | |
import time | |
class RandomNoise(): | |
""" | |
Random noise class to create random values in 2d array | |
""" | |
def __init__(self, width=32, height=32, bit_depth=255, extra=32): | |
self.w = width + extra | |
self.h = height + extra |
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
"c:\cygwin64\bin\sh" -lic "cd ${OLDPWD-.}; bash" |
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
/** | |
* Get presigned url to access xml file directly on s3. | |
*/ | |
public function getXmlUrlAttribute() | |
{ | |
$client = Storage::disk('s3')->getAdapter()->getClient(); | |
$command = $client->getCommand('GetObject', [ | |
'Bucket' => config('filesystems.disks.s3.bucket'), | |
'Key' => $this->xml_path, | |
]); |
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 | |
namespace App\Helpers; | |
/** | |
* Class MathHelper | |
* @package App\Helpers | |
* | |
* Implements negative, ceiling, floor and round functions with BCMath precision | |
* Credit to Matt Raines for function logic: https://stackoverflow.com/users/5024519/matt-raines | |
*/ |
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
class NovaServiceProvider extends NovaApplicationServiceProvider | |
{ | |
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
parent::boot(); |
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 apt-get update | |
sudo apt -y install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt -y install php7.4 | |
sudo apt-get install -y php7.4-{bcmath,bz2,common,curl,intl,gd,mbstring,mysql,opcache,xml,zip} |
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
alias tlog='bash ~/tlog.sh' | |
alias tend='bash ~/tend.sh' | |
alias tview='cat ~/work.txt' |
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
#include <cstdio> | |
#include <windows.h> | |
#define INPUT_MAX 255 | |
void main() | |
{ | |
wchar_t wstr[INPUT_MAX]; | |
char mb_str[INPUT_MAX * 3 + 1]; | |
unsigned long readln; |
OlderNewer