This file contains hidden or 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 mount -t cifs -o rw,vers=3.0,user=USER,uid=USER //URL/SHARENAME /mnt/MOUNTNAME | |
cd /mnt/MOUNTNAME/PATH/TO/WHATEVER | |
[do stuff] | |
sudo umount /mnt/MOUNTNAME |
This file contains hidden or 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 *.mp4 | |
do \ | |
ffmpeg -i "$i" -map_metadata 0 -c:v copy -c:a copy -tag:v hvc1 "$HOME/PATH/${i%.*}.mp4" | |
touch -r "$i" "$HOME/PATH/${i%.*}.mp4" | |
done |
This file contains hidden or 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
function retrieveJSONResponse() { | |
// create a new HttpClient | |
const http = new HttpClient(); | |
// retrieve the JSON response from the API | |
http.get('https://example.com/api/data') | |
.then(response => { | |
// store the values in an array | |
let jsonData = response.data; | |
let dataArray = []; |
This file contains hidden or 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 | |
youtube_url="$1" | |
echo "Downloading video..." | |
video_info=$(yt-dlp -e -o "%(title)s" -- "$youtube_url") | |
sanitized_title=$(echo "$video_info" | sed 's/[^a-zA-Z0-9_.-]/_/g') | |
output_file="${sanitized_title}.mp4" | |
yt-dlp -o "temp.mp4" -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' -- "$youtube_url" |
This file contains hidden or 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 | |
ffmpeg -f concat -safe 0 -i <(for f in ./*.mp4; do echo "file '$PWD/$f'"; done) -c copy output.mp4 |
This file contains hidden or 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 | |
ffmpeg -i ScrewedUpVideo.mp4 -itsoffset 0.33 -i ScrewedUpVideo.mp4 -vcodec copy -acodec copy -map 0:1 -map 1:0 FixedVideo.mp4 |
This file contains hidden or 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
jhead -n%Y%m%d-%H%M%S *.jpg |
This file contains hidden or 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
find /path/to -name "._*" -o -name ".DS_Store" | sed 's/.*/"&"/' | xargs rm -v |
This file contains hidden or 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 | |
# Be sure to remove all metric gathering scripts like Google Analytics | |
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://someURL |
This file contains hidden or 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
'use strict'; | |
angular.module('someApp') | |
.controller('MainCtrl', | |
['$scope', '$http', '$moment', '$q', | |
function ($scope, $http, $moment, $q) { | |
var bunchOfShit = 'value', | |
moreShit = 'anotherValue', | |
shitURL = 'https://someurl/' + bunchOfShit + '?callback=JSON_CALLBACK', | |
shitStormURL = 'https://anotherwebsite/' + moreShit + '?callback=JSON_CALLBACK', | |
dataShit = $http.jsonp(shitURL), |
NewerOlder