Skip to content

Instantly share code, notes, and snippets.

View bkrajendra's full-sized avatar
🎯
Focusing

Rajendra bkrajendra

🎯
Focusing
View GitHub Profile
@bkrajendra
bkrajendra / video_details.php
Created September 22, 2018 03:09 — forked from djekl/video_details.php
Get Video Details from YouTube or Vimeo
<?php
$urls = array();
$videos = array();
// vimeo test
$urls[] = 'http://vimeo.com/6271487';
$urls[] = 'http://vimeo.com/68546202';
// youtube test
@bkrajendra
bkrajendra / blinkLed.py
Last active September 1, 2019 10:02 — forked from elktros/blinkLed.py
LED Blink with Python RPI
#!/usr/bin/env python
import RPi.GPIO as GPIO # RPi.GPIO can be referred as GPIO from now
import time
ledPin = 22 # pin22
def setup():
GPIO.setmode(GPIO.BOARD) # GPIO Numbering of Pins
GPIO.setup(ledPin, GPIO.OUT) # Set ledPin as output
GPIO.output(ledPin, GPIO.LOW) # Set ledPin to LOW to turn Off the LED
@bkrajendra
bkrajendra / ffmpeg.md
Created July 6, 2020 06:42 — forked from protrolium/ffmpeg.md
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@bkrajendra
bkrajendra / install-docker.md
Last active July 30, 2023 07:17 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command
@bkrajendra
bkrajendra / cleanupUnusedWorkspaceInSlaves.groovy
Created September 6, 2023 06:17 — forked from ceilfors/cleanupUnusedWorkspaceInSlaves.groovy
When you delete jobs in Jenkins, the corresponding workspaces in the build slaves won't be deleted automatically. This Jenkins script will go to each slave and check if the jobs are already deleted in Jenkins master and delete the workspace.
import com.cloudbees.hudson.plugins.folder.Folder
import hudson.FilePath
import jenkins.model.Jenkins
def boolean isFolder(String name) {
def item = Jenkins.instance.getItemByFullName(name)
return item instanceof Folder
}
def deleteUnusedWorkspace(FilePath root, String path) {