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
# Allow to write over file system (steam os block) | |
sudo steamos-readonly disable | |
# Ensure we have the keys updated | |
sudo pacman-key --init | |
sudo pacman-key --populate archlinux | |
sudo pacman-key --populate holo | |
sudo pacman -S glibc linux-api-headers | |
# Install git and base-devel dependencies |
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
# Add at the end of your .zshrc file | |
# After every command `cd`, it checks if there is a ".nvmrc" file in the current directory and if it exists it changes the version of nodejs automatically | |
# Create a .nvmrc file like this: `echo "v16.15.0" > .nvmrc` in the folder you want to use the specific version of nodejs | |
function nvm_change_by_dir() { | |
emulate -L zsh | |
if [ -f ".nvmrc" ]; then | |
NODEJS_VERSION=$(cat .nvmrc); | |
COMMAND="nvm use" | |
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
#overwatch-pre-script.sh | |
#!/bin/bash | |
xrandr --output HDMI-1 --primary --left-of eDP-1 # change primary display to monitor, instead of the notebook's display | |
gsettings set org.gnome.desktop.peripherals.mouse accel-profile 'flat' # remove mouse acceleration from gnome to respect mouse DPI | |
sleep 3 #just to give "time" for the things | |
##### Other script/file | |
#overwatch-post-script.sh | |
#!/bin/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
# Add at the end of your .zshrc file | |
# After every command `cd`, it will check a ".phpbrew" file in the current directory and if it exists it will change the version of php automatically | |
# Create a .phpbrew file like this: `echo "7.4.4" > .phpbrew` in the folder you want to use the specific version of php | |
function phpbrew_change_by_dir() { | |
emulate -L zsh | |
if [ -f ".phpbrew" ]; then | |
PHPBREW_LOCAL_VERSION=$(cat .phpbrew); | |
COMMAND="phpbrew use "; |
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 | |
function title(){ | |
echo "##########################" | |
echo "## $1 ##" | |
echo "##########################" | |
} | |
# first param is the CSV file | |
FILE_CSV=$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
/* Copyright (C) 1991-2019 Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 | |
$rsaPriv = __DIR__ . '/priv.pem'; | |
$rsaPub = __DIR__ . '/pub.pem'; | |
if ($_SERVER['REQUEST_METHOD'] === 'POST') { | |
$encrypted = $_POST['pass']; | |
$ok = \openssl_private_decrypt(base64_decode($encrypted), $decrypted, file_get_contents($rsaPriv), OPENSSL_PKCS1_PADDING); | |
var_dump($decrypted, $ok); |
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
# How to install phpbrew | |
# https://github.com/phpbrew/phpbrew | |
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew | |
chmod +x phpbrew | |
sudo mv phpbrew /usr/local/bin/phpbrew | |
# build openssl in your raspberry (it takes some time): https://raspberrypi.stackexchange.com/a/66788 | |
git clone git://git.openssl.org/openssl.git | |
cd openssl | |
./config |
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 | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
require './vendor/autoload.php'; | |
// create a log channel | |
$log = new Logger('name'); | |
$log->pushHandler(new StreamHandler('your.log', Logger::WARNING)); |
NewerOlder