Skip to content

Instantly share code, notes, and snippets.

View gvoze32's full-sized avatar
🕓
Busy

Syafa Adena gvoze32

🕓
Busy
View GitHub Profile
@gvoze32
gvoze32 / pixelsidle.js
Last active November 15, 2023 09:25
pixels idle
function simulateKeyPress(keyCode, eventType) {
var eventObj = document.createEventObject
? document.createEventObject()
: document.createEvent("Events");
if (eventObj.initEvent) {
eventObj.initEvent(eventType, true, true);
}
eventObj.keyCode = keyCode;
@gvoze32
gvoze32 / satsetjolly.js
Last active November 10, 2023 07:12
satset jolly
async function automateProcess() {
for (let i = 0; i < 10000; i++) {
try {
console.log(`Iteration: ${i + 1}`);
const diamondsText = document.querySelector('div[style*="color: rgb(27, 67, 86);"][style*="font-size: 1rem;"][style*="margin-top: 0.5rem;"][style*="text-align: center;"]');
if (!diamondsText) {
console.error('Element with specified selector not found.');
continue;
int min, max;
min=jam[0];
max=jam[0];
for(int i=0;i<2;i++)
{
if(min>jam[i])
{
min=jam[i];
}
else if(max<jam[i])
@gvoze32
gvoze32 / sortingnamabubblesortdinamis.cpp
Last active November 4, 2021 12:56
Sorting nama menggunakan bubble sort secara dinamis
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
string tmp;
int i, k, j, jumlah, pilihan;
@gvoze32
gvoze32 / ffmpeg mp3 to mp4.MD
Last active February 7, 2024 14:07
Convert mp3 audio to MP4 using ffmpeg in terminal.

To convert audio mp3 to MP4 by ffmpeg, use the following command

ffmpeg -f lavfi -i color=c=black:s=1280x720:r=5 -i audio.mp3 -crf 0 -c:a copy -shortest output.mp4

Description

This generates mp4 formatted video with blank black background with the color source filter instead of using an image.

Since it is just black video this is one case with lossless mode (-crf 0) will have a smaller file size than the default lossy mode.

@gvoze32
gvoze32 / zip multiple directories into individual zip files.md
Last active April 20, 2021 14:06
zip multiple directories into individual zip files

zip multiple directories into individual zip files

You can use this loop in bash

$ for i in */; do zip -r "${i%/}.zip" "$i"; done

Parallel execution

$ for i in */; do zip -0 -r "${i%/}.zip" "$i" & done; wait
@gvoze32
gvoze32 / auto_install_ioncube.sh
Last active January 16, 2023 15:00
Auto install IonCube PHP Loader/Encoder for Debian x64
#!/bin/bash
curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xvzf ioncube_loaders_lin_x86-64.tar.gz
rm ioncube_loaders_lin_x86-64.tar.gz
cd ioncube
php_ext_dir="$(command php -i | grep extension_dir 2>'/dev/null' \
| command head -n 1 \
| command cut --characters=31-38)"
php_version="$(command php --version 2>'/dev/null' \
| command head -n 1 \
@gvoze32
gvoze32 / config_0
Last active October 11, 2020 14:16
Tilda Nord config
tilda_config_version="1.5.2"
command=""
font="mplus Nerd Font Mono 9"
key="F12"
addtab_key="<Shift><Control>t"
fullscreen_key="F11"
toggle_transparency_key="F12"
toggle_searchbar_key="<Shift><Control>f"
closetab_key="<Shift><Control>w"
nexttab_key="<Control>Page_Down"
@gvoze32
gvoze32 / ffmpeg GIF to MP4.MD
Last active April 17, 2024 20:51
Convert animated GIF to MP4 using ffmpeg in terminal.

To convert animation GIF to MP4 by ffmpeg, use the following command

ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4

Description

movflags – This option optimizes the structure of the MP4 file so the browser can load it as quickly as possible.

pix_fmt – MP4 videos store pixels in different formats. We include this option to specify a specific format which has maximum compatibility across all browsers.