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
<?xml version="1.0"?> | |
<Alias targetDevice1="Logitech G923 TRUEFORCE Racing Wheel PS USB" | |
targetDevice2="Logitech G923 TRUEFORCE Racing Wheel PS" | |
targetProductGuid="{C266046D-0000-0000-0000-504944564944}"> | |
<Axis axis="x" name="Steering" /> | |
<Axis axis="y" name="Gas" /> | |
<Axis axis="rz" name="Brake" /> | |
<Axis axis="slider:0" name="Clutch" /> | |
<Button number="1" name="X" /> | |
<Button number="2" name="Square" /> |
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 | |
set -e | |
SOURCE="/media/dgacitua/DGACITUA-SSD/" # Mounted external drive path (including trailing slash) | |
DESTINATION="/home/dgacitua/rsync-backup" # Local folder where the data is copied (without trailing slash) | |
mkdir -p $DESTINATION | |
rsync -azuvhP --delete --exclude="node_modules" --iconv=. $SOURCE $DESTINATION # Making backup with RSync |
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 | |
# Customize the following variables | |
REMOTE_USERNAME=myuser # Remote server username | |
REMOTE_HOST=server.myuser.info # Remote server domain or IP address | |
REMOTE_PORT=4000 # Remote server port to redirect | |
LOCAL_PORT=3000 # Local machine port where the remote port is redirected | |
echo -e "Tunneling to $REMOTE_HOST from remote port $REMOTE_PORT to local port $LOCAL_PORT" |
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
library(kernlab) | |
spectrumSVM <- list(type = "Classification", library = "kernlab", loop = NULL) | |
spectrumSVM$parameters <- data.frame(parameter = c("C", "length"), class = c("numeric", "numeric"), label = c("Cost", "length")) | |
spectrumSVM$grid <- function(x, y, len = NULL, search = "grid") { | |
if (search == "grid") { | |
out <- expand.grid(length = 2:(len+1), C = 2^((1:len)-3)) | |
} else { |
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 | |
# https://gist.github.com/spyesx/0edd62936600ffe7ca0b5c27bc7d080c | |
# https://explainshell.com/explain?cmd=rsync+-azuvhP+--delete+--exclude%3D%22node_modules%22 | |
set -e | |
# Replace SOURCE and DESTINATION values to match your needs | |
SOURCE="remoteuser@mydomain.info:/home/remoteuser/" | |
DESTINATION="/home/localuser/rsync-backup" |
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
server { | |
listen 80; | |
server_name myapp.org; | |
error_log /var/log/nginx/myapp.error.log warn; | |
client_max_body_size 50M; | |
location / { | |
proxy_pass http://localhost:3000; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
# Run "crontab -e" and add the uncommented lines at the end of the file | |
# Be sure to put the absolute path of mongobackup.sh | |
# This job will run every Saturday at 01:00 | |
0 1 * * 6 ./home/myuser/mongobackup.sh |
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
# KeyUp/Keydown logger in Python3 (outputs to terminal) | |
# Based on https://blog.robertelder.org/detect-keyup-event-linux-terminal/ | |
import signal | |
import re | |
import struct | |
import select | |
import os | |
import subprocess |
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
# KeyUp/Keydown logger in Python3 (writes to CSV file) | |
# Based on https://blog.robertelder.org/detect-keyup-event-linux-terminal/ | |
import signal | |
import re | |
import struct | |
import select | |
import os | |
import subprocess | |
import csv |
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
server { | |
listen 80; | |
server_name mydomain.org www.mydomain.org; | |
return 301 https://mydomain.org$request_uri; | |
} | |
server { | |
listen 443 ssl default_server; | |
server_name mydomain.org www.mydomain.org; |
NewerOlder