Skip to content

Instantly share code, notes, and snippets.

View prashantsharma's full-sized avatar
🎯
📦 🚢 😉

Prashant Sharma prashantsharma

🎯
📦 🚢 😉
View GitHub Profile
@prashantsharma
prashantsharma / run_olp.md
Last active December 9, 2022 04:45
Run OLP locally

Method - 1

#!/usr/bin/env php

function upperCaseFirst(inputStr) {
var valueOfFirstChar = inputStr.charCodeAt(0);
console.log('Value of first character:', valueOfFirstChar);
var upperCaseLetter = String.fromCharCode(valueOfFirstChar - 32);
console.log('Uppercase first character:', upperCaseLetter);
var restOfString = inputStr.slice(1);
console.log('Rest of the string:', restOfString);
@prashantsharma
prashantsharma / appify
Created April 25, 2020 17:32 — forked from subtleGradient/appify
appify. Create the simplest possible mac app from a shell script
#!/usr/bin/env bash
#
# url : https://gist.github.com/672684
# version : 2.0.2
# name : appify
# description : Create the simplest possible mac app from a shell script.
# usage : cat my-script.sh | appify MyApp
# platform : Mac OS X
# author : Thomas Aylott <[email protected]>
@prashantsharma
prashantsharma / appify
Created April 25, 2020 17:32 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@prashantsharma
prashantsharma / GIF-Screencast-OSX.md
Created July 20, 2019 19:53 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@prashantsharma
prashantsharma / difference.js
Created June 14, 2019 08:10 — forked from Yimiprod/difference.js
Deep diff between two object, using lodash
/**
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@prashantsharma
prashantsharma / multiple-3rd-party-widgets.js
Created January 28, 2018 13:17 — forked from zenorocha/multiple-3rd-party-widgets.js
Loading multiple 3rd party widgets asynchronously
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);