Skip to content

Instantly share code, notes, and snippets.

View manshu's full-sized avatar
🎧
Focusing

Himanshu Batra manshu

🎧
Focusing
View GitHub Profile
name: Gurulabs.dev
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
{
"name": "gurulabs",
"version": "1.0.0",
"main": "index.js",
"repository": "git@github.com:manshu/shopify-gurulabs.git",
"author": "Himanshu Batra <himanshu@batra.io>",
"license": "MIT",
"scripts": {
"watch": "mix watch"
},
@manshu
manshu / package.json
Created November 22, 2020 02:15
NextJS with Typescript
{
"name": "myapp",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
<template>
<div>
<form @submit.prevent="onSubmit" class="mt-4 sm:flex sm:max-w-md">
<input
aria-label="Email address"
type="email"
name="email"
v-model="form.email"
required
class="appearance-none w-full px-5 py-3 border border-transparent text-base leading-6 rounded-md text-gray-900 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 transition duration-150 ease-in-out"
@manshu
manshu / CRMServiceProvider
Last active July 13, 2020 15:23
Pipedrive CRMServiceProvider
class CRMServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
}
var stripe = Stripe(
document.head.querySelector('meta[name="stripeKey"]').content
);
var elements = stripe.elements();
var card = elements.create("card");
card.mount("#card");
card.addEventListener("change", function(event) {
var displayError = document.getElementById("cardErrors");
if (event.error) {
displayError.textContent = event.error.message;
@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)
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
proxy_pass http://127.0.0.1:3000; # set the address of the Node.js
}