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
// Constants | |
const passphrase = 'A3PnGzWjxGuAYtFu', | |
key = 'data', | |
object = { foo: 'bar' }; | |
// Log original item | |
console.log('Original object', object); | |
// Store item with encryption | |
setItem(key, object, passphrase) |
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
@echo THIS MUST BE RUN WITH WINDOWS POWERSHELL FOR INITIAL CHOCOLATEY INSTALLATION | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install brave jre8 firefox 7zip vlc notepadplusplus git openssh putty nodejs sysinternals jdk8 chocolatey-windowsupdate.extension vcredist140 netfx-4.7.1-devpack filezilla teamviewer dotnetfx dotnet3.5 vcredist2015 dotnet4.5 python winscp vscode rainmeter sourcetree qbittorrent androidstudio composer goggalaxy gimp irfanview spotify |
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
const {app, BrowserWindow} = require('electron'); | |
const url = require('url'); | |
const path = require('path'); | |
let mainWindow; | |
function createWindow() { | |
mainWindow = new BrowserWindow({ | |
width: 1000, | |
height: 800, |
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 update | |
sudo apt upgrade -y | |
sudo apt dist-upgrade -y | |
sudo apt install nginx redis-server curl dirmngr apt-transport-https lsb-release ca-certificates -y | |
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - | |
sudo apt -y install nodejs | |
sudo apt -y install gcc g++ make | |
sudo ufw allow 'Nginx HTTP' | |
sudo apt install mariadb-server -y | |
sudo mysql_secure_installation |
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
// Constants | |
const passphrase = 'password', | |
key = 'data', | |
object = { foo: 'bar' }; | |
// Log original item | |
console.log('Original object', object); | |
// Store item with encryption | |
setItem(key, object, passphrase); |
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
SELECT StrangerId, COUNT(MutualFollowing) AS MutualFollowingCount | |
FROM ( | |
SELECT | |
CASE WHEN f.following_user = mf.friendId THEN f.user ELSE f.following_user END AS StrangerId, | |
CASE WHEN f.user = mf.friendId THEN f.user ELSE f.following_user END AS MutualFollowing | |
FROM ( | |
SELECT | |
CASE WHEN user = 1 THEN following_user | |
ELSE user | |
END AS friendId |
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
SELECT id, address, datetime, price, ROUND(6371 * acos(cos(radians(1.329380)) * cos(radians(event_lat)) * cos(radians(event_lng) - radians(103.775595)) + sin(radians(1.329380)) * sin(radians(event_lat))), 3) as distance | |
FROM jobs | |
WHERE (6371 * acos(cos(radians(1.329380)) * cos(radians(event_lat)) * cos(radians(event_lng) - radians(103.775595)) + sin(radians(1.329380)) * sin(radians(event_lat)))) < 50 | |
ORDER BY distance DESC; |
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 artisan key:generate | |
php artisan cache:clear | |
php artisan migrate | |
php artisan passport:install | |
php artisan serve |
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, body, .class, #id { | |
overflow: auto; | |
scrollbar-width: none; | |
-ms-overflow-style: none; | |
} | |
::-webkit-scrollbar { | |
width: 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
cipher /w:C: |