Skip to content

Instantly share code, notes, and snippets.

Changelogs:
- Record keyboard typing
- Screen record
- Monitoring activity
- Auto turn on microphone while startup
@wilik16
wilik16 / icloud_photos_date_modifier_script.rb
Created June 19, 2023 14:35
Almost similar with https://gist.github.com/wilik16/ce6f3e96b90fd459da661c4e22be3c91, but this one is based on the photo's exif instead of the csv file from icloud. Unfortunately this script is still incomplete but almost complete.
# frozen_string_literal: true
require 'exif'
require 'time'
folders = Dir.foreach('.').select do |e|
/^iCloud Photos/.match(e)
end
photos_paths = []
@wilik16
wilik16 / icloud_photos_modified_date_script.rb
Created June 19, 2023 14:31
Ruby script to change modified date of iCloud Photos downloaded from icloud.com so that it's easier to be sorted.
# frozen_string_literal: true
require 'csv'
require 'time'
require 'fileutils'
# find all folders starting with "iCloud Photos"
folders = Dir.foreach('.').select do |e|
/^iCloud Photos/.match(e)
end
@wilik16
wilik16 / index.js
Created July 7, 2021 03:34
Discord giveaway bot sample using discord.js
// Create discord application (bot) : https://discord.com/developers/applications
// discord.js guide : https://discordjs.guide/
const Discord = require('discord.js');
const client = new Discord.Client();
const organizerId = `<enter organizer discord's id here>`;
const botToken = `<enter bot token here>`;
var participants = [];
@wilik16
wilik16 / bot.js
Created February 1, 2021 03:33
Giveaway bot sample for twitch
const tmi = require('tmi.js');
// Define configuration options
const opts = {
identity: {
username: <BOT_USERNAME>,
password: <OAUTH_TOKEN>
},
channels: [
<CHANNEL_NAME>
@wilik16
wilik16 / build.gradle
Last active November 8, 2022 12:52
Archive/Copy debug or release APK / AAB (Android App Bundle) file and/or mapping.txt to a versioned folder
android {
applicationVariants.all { variant ->
variant.outputs.all {
def fileName = "app"
switch (variant.buildType.name) {
case "debug":
fileName = "${appNameDebug}-${variant.versionCode}"
break
case "release":
fileName = "${appNameRelease}-${variant.versionCode}"