Skip to content

Instantly share code, notes, and snippets.

View manshu's full-sized avatar
🎧
Focusing

Himanshu Batra manshu

🎧
Focusing
View GitHub Profile
@manshu
manshu / encoding-video.md
Created June 8, 2020 04:26 — forked from matinfo/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@manshu
manshu / Props
Created June 1, 2020 18:52 — forked from mynameispj/Props
Estimated reading time in PHP, by Brian Cray
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/
@manshu
manshu / osx_bootstrap.sh
Created May 22, 2020 02:58 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@manshu
manshu / US_States_and_Cities.json
Created December 3, 2019 20:23 — forked from ahmu83/US_States_and_Cities.json
List of US States and Cities in JSON format.
{
"New York": [
"New York",
"Buffalo",
"Rochester",
"Yonkers",
"Syracuse",
"Albany",
"New Rochelle",
"Mount Vernon",
@manshu
manshu / laravel-nearby-locations-query-scope.php
Created June 1, 2019 19:56 — forked from stevenmaguire/laravel-nearby-locations-query-scope.php
Laravel (Illuminate) query builder scope to list neighboring locations within a given distance from a given location
<?php
/**
* Query builder scope to list neighboring locations
* within a given distance from a given location
*
* @param Illuminate\Database\Query\Builder $query Query builder instance
* @param mixed $lat Lattitude of given location
* @param mixed $lng Longitude of given location
* @param integer $radius Optional distance
@manshu
manshu / command.sh
Created March 3, 2019 02:35 — forked from gangsthub/command.sh
PM2 start nuxt
# now run in your console: (I'm actually using powershell)
pm2 start .\ecosystem.config.js
@manshu
manshu / gist:fe095176588f2d35fa421216e23b9146
Created August 19, 2017 06:55 — forked from belsrc/gist:672b75d1f89a9a5c192c
Simple Vue.js filters that I usually need
/**
* Changes value to past tense.
* Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc.
* http://jsfiddle.net/bryan_k/0xczme2r/
*
* @param {String} value The value string.
*/
Vue.filter('past-tense', function(value) {
// Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing
var vowels = ['a', 'e', 'i', 'o', 'u'];
@manshu
manshu / List.md
Created August 8, 2017 05:40 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@manshu
manshu / .vimrc
Created July 23, 2017 05:05 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15