Skip to content

Instantly share code, notes, and snippets.

View rachhen's full-sized avatar
🎯
Focusing

Rachhen rachhen

🎯
Focusing
View GitHub Profile
import os
from moviepy.editor import VideoFileClip, AudioFileClip, vfx
import imageio_ffmpeg as ffmpeg
# Function to flip a video, replace its audio, and adjust its speed
def process_video(
input_file,
output_file,
tmp_output_file,
@rachhen
rachhen / react-native-authentication.md
Created April 21, 2022 13:45 — forked from silvioramalho/react-native-authentication.md
Creating React Native Authentication

Creating React Native Authentication

Creating a complete authentication flow using context-api. (Step-by-step)

This flow can be replicated to React-JS (Web)

Creating App

npx react-native init reactNativeAuth --template react-native-template-typescript

@rachhen
rachhen / adcreatives.jsonc
Created April 29, 2021 16:17
Create Post Videos Carousel (PE) to Facebook Pages
// POST https://graph.facebook.com/v10.0/${adAccount}/adcreatives
{
"name": "SomeRandomStaff",
// https://developers.facebook.com/docs/marketing-api/reference/ad-creative-object-story-spec/
"object_story_spec": {
"page_id": 1014101516988,
"link_data": {
// https://developers.facebook.com/docs/marketing-api/reference/ad-creative-link-data/
"message": "I love you bee",
"caption": "https://example.com", // Call to action (cta)
@rachhen
rachhen / youtube.js
Created November 11, 2020 17:36 — forked from max-te/youtube.js
Download Youtube-Video in node.js
var http = require('http')
var fs = require('fs')
var argv = require('optimist').argv
var rxVideoID = /v=([\]\[!"#$%'()*+,.\/:;<=>?@\^_`{|}~-\w]*)/
var link = argv._.toString()
var videoID = link.match(rxVideoID)[1]
http.get("http://www.youtube.com/get_video_info?video_id="+videoID, function(res) {
var chunks = []
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
@rachhen
rachhen / install-redis.sh
Created September 28, 2020 08:16 — forked from jpickwell/install-redis.sh
Installing Redis 5.0.0 on Amazon Linux
#!/bin/bash
###############################################
# To use:
# chmod +x install-redis.sh
# ./install-redis.sh
###############################################
version=5.0.0
@rachhen
rachhen / get_image_by_size.php
Last active November 4, 2019 14:17
Get image from url, resize and return back with resized
<?php
if (!isset($_GET['size'])) {
echo "Please provide size image. Ex: get_image_by_size.php?size=250x150";
exit;
}
$size = $_GET['size'];
list($w, $h) = explode('x', $size);
$url = "https://cdn.pixabay.com/photo/2019/10/29/15/57/vancouver-4587302_960_720.jpg";
$im = imagecreatefromstring(file_get_contents($url));
$url_info = pathinfo($url);