Skip to content

Instantly share code, notes, and snippets.

View chaitu87's full-sized avatar

Chaithanya Padi chaitu87

View GitHub Profile
@chaitu87
chaitu87 / ffmpeg-to-480p.sh
Created April 21, 2020 09:44 — forked from blacklee/ffmpeg-to-480p.sh
ffmpeg convert video to 480p
ffmpeg -i input.mp4 -s hd480 -c:v libx264 -crf 23 -c:a aac -strict -2 output.mp4
@chaitu87
chaitu87 / task.js
Last active November 14, 2019 11:48
Coding Exercise 14th November
// There are two arrays of Objects
var alist = [{a: 1, b: 2}, {a:3, c:20, d: 5}, {b: 20, a: 15}]
var blist = [{d: 12, c: 10}, {a:3, c:2}, {d: 10, b: 1}]
// PROBLEM #1
// --------------
// Create an array which is a union of alist & blist
// create a new array with objects which contain "a" attribute
// print this array
@chaitu87
chaitu87 / OSX_installers.txt
Created October 11, 2018 08:34
OSX Installers
macOS Sierra (10.12)
https://itunes.apple.com/us/app/macos-sierra/id1127487414?mt=12
macOS High Sierra (10.13)
https://itunes.apple.com/us/app/macos-high-sierra/id1246284741?mt=12
macOS Mojave (10.14)
https://itunes.apple.com/in/app/macos-mojave/id1398502828?mt=12
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep elasticsearch
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
launchctl remove homebrew.mxcl.elasticsearch
pkill -f elasticsearch
@chaitu87
chaitu87 / default.md
Created July 9, 2018 08:08
Sample Grav Typography
title
Typography

! Details on the full capabilities of Spectre.css can be found in the Official Spectre Documentation

The Quark theme is the new default theme for Grav built with Spectre.css the lightweight, responsive and modern CSS framework. Spectre provides basic styles for typography, elements, and a responsive layout system that utilizes best practices and consistent language design.

Headings

@chaitu87
chaitu87 / noko.sh
Created May 18, 2018 09:11
Nokogiri OSX setup
gem install nokogiri -v 1.6.8.1 -- --use-system-libraries=true --with-xml2-include="$(xcrun --show-sdk-path)"/usr/include/libxml2
@chaitu87
chaitu87 / precompilerrors.rb
Last active July 22, 2019 12:18
Finding precompile errors in rails, to be executed in 'rails console'
JS_PATH = "app/assets/javascripts/**/*.js";
Dir[JS_PATH].each do |file_name|
puts "\n#{file_name}"
begin
Uglifier.compile(File.read(file_name))
rescue => e
puts $!
puts $@
end
end
@chaitu87
chaitu87 / docrontest.sh
Last active December 12, 2016 19:46
test all jobs of cron
crontab -l | grep -v '^#' | cut -f 6- -d ' ' | while read CMD; do eval $CMD; done
@chaitu87
chaitu87 / setup-jira-bitbucket.sh
Last active June 9, 2017 14:44
Setting up jira & bitbucket servers on Digital Ocean
wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-7.2.6-x64.bin
# Install mysql 5.6
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ondrej/mysql-5.6
sudo apt-get update
sudo apt-get install mysql-server
create database jiradb character set utf8 collate utf8_bin;
grant select,insert,update,delete,create,drop,alter,index on jiradb.* to root@localhost identified by '**thepass**';
// Dealing with Internation ISD Codes
$('input[type="tel"]').intlTelInput({
initialCountry: "auto",
nationalMode: true,
geoIpLookup: function(callback) {
$.get('//ipinfo.io', function() {}, "jsonp").always(function(resp) {
var countryCode = (resp && resp.country) ? resp.country : "";
callback(countryCode);
});
}