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 path = require('path') | |
const express = require('express') | |
const app = express() | |
const bodyParser = require('body-parser') | |
const mongodb = require('mongodb').MongoClient | |
// MongoDB Snippet | |
const mongodbUrl = 'mongodb://localhost:27017' // Local MongoDB Server Address | |
mongodb.connect(mongodbUrl, function(err, client) { // Connect to local MongoDB Server | |
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 | |
# Typora Installer by dragonman225 | |
# Variables | |
USER=$(/usr/bin/id -run) | |
INSTALL_DIR="${HOME}/applications" | |
APP_SHORTCUT="/usr/share/applications/typora.desktop" | |
TYPORA_ARCHIVE="/tmp/Typora-linux-x64.tar.gz" | |
# Greeting |
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
# SVP4 Install for Arch | |
# Dependencies | |
sudo pacman -S vulkan-headers mediainfo-gui lsof vapoursynth qt5-declarative |
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 | |
EXT_BROWSERPLUS="/mnt/data/Sync/Web/Projects/BrowserPlus" | |
SESSION_DIR="${HOME}/Downloads/chrm-session" | |
if [ -z "$1" ] || [ -z "$2" ]; | |
then | |
echo "Usage: start-chrm.sh {URL} {Session_Name}" | |
else | |
OPT_EXT="--load-extension=${EXT_BROWSERPLUS}" |
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
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
pnpm-debug.log* | |
lerna-debug.log* | |
# Node.js |
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
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": "eslint:recommended", | |
"globals": { | |
"Atomics": "readonly", |
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
/** | |
* Upgrade dependencies to the latest with pnpm. | |
*/ | |
const { spawn } = require('child_process') | |
const manifest = require('../package.json') | |
const devDeps = Object.keys(manifest.devDependencies | |
? manifest.devDependencies : []) |
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 | |
lsblk | |
echo -e "Proceed to stop sda, sdc, sdd ? (y/n)" | |
read -p "> " answer | |
if [ $answer = "y" ]; then | |
echo 1 > /sys/block/sda/device/delete | |
echo 1 > /sys/block/sdc/device/delete | |
echo 1 > /sys/block/sdd/device/delete |
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 | |
for i in $(seq 1 5); | |
do | |
echo "Scan host${i}" | |
echo "- - -" > /sys/class/scsi_host/host${i}/scan | |
done |
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 | |
for file in *.wav; | |
do name=$(echo $file | sed "s/\\.wav//g"); | |
ffmpeg -acodec dts -i "$name".wav -vn -sn -acodec flac "$name".flac; | |
done |
OlderNewer