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
# Usage: convert_slin2wav.sh in.slin out.wav | |
sox -t raw -r 8000 -b 8 -c 1 --bits 16 --encoding signed-integer --endian little $1 $2 |
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
Sub QuoteCommaExport() | |
' Dimension all variables. | |
Dim DestFile As String | |
Dim ColumnCount As Integer | |
Dim RowCount As Integer | |
' Prompt user for destination file name. | |
DestFile = InputBox("Enter the destination filename" _ | |
& Chr(10) & "(with complete path):", "Quote-Comma Exporter") |
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 numpy as np | |
import pandas as pd | |
from keras.models import Sequential | |
from keras.layers import Dense, LSTM, Dropout, Conv2D, Reshape, TimeDistributed, Flatten, Conv1D,ConvLSTM2D, MaxPooling1D | |
from keras.layers.core import Dense, Activation, Dropout | |
from sklearn.preprocessing import MinMaxScaler | |
from sklearn.metrics import mean_squared_error | |
import tensorflow as tf | |
import matplotlib.pyplot as plt |
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
Create the file /etc/ppp/ip-up with following content: | |
#!/bin/sh | |
/sbin/route add <SUBNET> -interface $1 | |
replacing <SUBNET> with subnet, you want to route through VPN (for ex. 192.168.0.0/16) | |
execute as root: | |
chmod 0755 /etc/ppp/ip-up | |
This file will be executed each time you connect to VPN. |
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
Just try these following commands | |
1) ssh-keygen | |
Press Enter key till you get the prompt | |
2) ssh-copy-id -i ~/.ssh/id_rsa.pub root@ip_address | |
(It will once ask for the password of the host system) | |
3) ssh root@ip_address | |
Now you should be able to login without any password |
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
// Fix iOS Audio Context by Blake Kus https://gist.github.com/kus/3f01d60569eeadefe3a1 | |
// MIT license | |
(function() { | |
window.AudioContext = window.AudioContext || window.webkitAudioContext; | |
if (window.AudioContext) { | |
window.audioContext = new window.AudioContext(); | |
} | |
var fixAudioContext = function (e) { | |
if (window.audioContext) { | |
// Create empty buffer |
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
:: With custom video file | |
./chrome.exe --use-fake-device-for-media-stream --use-file-for-fake-video-capture=c:\akiyo_qcif.y4m --user-data-dir=C:\tmp | |
:: With default stream | |
./chrome.exe --use-fake-device-for-media-stream --user-data-dir=C:\tmp2 |
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 | |
commands=("man" "pwd" "ls" "whoami" "df" "top") | |
timestamp(){ date +'%Y-%m-%s %H:%M:%S'; } | |
log(){ echo -e "$(timestamp)\t$1\t$(whoami)\t$2" > /var/log/rbash.log; } | |
trycmd() | |
{ | |
# Provide an option to exit the shell | |
if [[ "$ln" == "exit" ]] || [[ "$ln" == "q" ]] | |
then |
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
# Install PowerShell | |
sudo snap install powershell --classic | |
# Or refer to following official link for further options. (I followed installation via package repository for Ubuntu 20.04) | |
# https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#installation-via-package-repository---ubuntu-2004 | |
# install NTLM dependency | |
sudo apt install gss-ntlmssp | |
# Start PowerShell | |
sudo pwsh |
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
Tested with Safari Version 12.1 (14607.1.40.1.4), running following line in Safari's console did the trick for me: | |
document.getElementById('root')['_reactRootContainer'] | |
._internalRoot.current.child.memoizedProps | |
.children.props.store.getState() | |
A related StackOverflow post: | |
https://stackoverflow.com/questions/59584733/how-do-i-access-the-redux-store-in-safari/68730213#68730213 |
OlderNewer