List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
def timeConversion(stringg): | |
hour = stringg[:2] | |
mins = stringg[3:5] | |
seconds = stringg[6:8] | |
timeconvention = stringg[8:] | |
rest = stringg[2:8] | |
if int(hour) >= 1 and int(hour) <= 12 and int(mins) >= 0 and int(mins) <= 59 and int(seconds) >= 0 and int(seconds) <= 59: | |
if(timeconvention == 'PM'): | |
if(int(hour) is not 12): |
function timeConversion(stringg){ | |
let hour = stringg.substring(0,2) | |
let mins = stringg.substring(3,5) | |
let seconds = stringg.substring(6,8) | |
let timeconvention = stringg.substring(8,10) | |
let rest = stringg.substring(2,8) | |
if(timeconvention == 'PM'){ | |
if(parseInt(hour) != 12){ | |
let hour1 = 0 |
Open Terminal Ctrl+Alt+T
Download Firefox Developer Edition tar file
wget https://download.mozilla.org/?product=firefox-aurora-latest-ssl&os=linux64&lang=en-US
Copy tar file to opt
sudo cp -rp firefox-35.0a2.en-US.linux-x86_64.tar.bz2
Open opt
folder (cd /opt/
) and untar file
sudo tar xjf firefox-35.0a2.en-US.linux-x86_64.tar.bz2
Rust error handling is nice but obligatory. Which makes it sometimes plenty of code.
Functions return values of type Result that is "enumeration". In Rust enumeration means complex value that has alternatives and that alternative is shown with a tag.
Result is defined as Ok or Err. The definition is generic, and both alternatives have
The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.
With ffmpeg
this can be achieved with -c copy
. Older examples may use -vcodec copy -acodec copy
which does the same thing.
These examples assume ffmpeg
is in your PATH
. If not just substitute with the full path to your ffmpeg binary.
for %%f in (*.flv) do ( | |
ffmpeg -i "%%~nf.flv" -vcodec copy -acodec copy "%%~nf.mp4" | |
) |
docker kill $(docker ps -q)
to kill all running containers
docker rm $(docker ps -a -q)
to delete all stopped containers.
docker volume rm $(docker volume ls -q)
to delete all volumes.
docker rmi $(docker images -q)
to delete all images.
Run all commands:
docker kill $(docker ps -q) && docker rm $(docker ps -a -q) && docker volume rm $(docker volume ls -q) && docker rmi $(docker images -q)
For fish shell, remove the $
: