Skip to content

Instantly share code, notes, and snippets.

Girish Patil theevilhead

  • India
Block or report user

Report or block theevilhead

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@theevilhead
theevilhead / amp-email-personalised-newsletter.html
Last active Apr 29, 2019
This amp email has personalised posts in newsletters with bookmarking and upvoting options. Which hit an endpoint on action. It also has a unsubscribe/resubscribe button inside the email. All these operations are done without leaving your email.
View amp-email-personalised-newsletter.html
<!doctype html>
<!-- Either ⚡4email or amp4email is valid -->
<html ⚡4email>
<head>
<!-- REQUIRED -->
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<script async custom-element="amp-list" src="https://cdn.ampproject.org/v0/amp-list-0.1.js"></script>
@theevilhead
theevilhead / mixmatch.gs
Last active Dec 18, 2018
Secret santa mixmatch with google sheets and apps script : Use this script following the instructions in the gist to create a Secret santa mix-match and if needed send each user their partner's details Read whole post here @Hashnode https://hashnode.com/post/secret-santa-mix-match-with-google-sheets-and-apps-script-cjptefe1d00rikas2z9joelqa
View mixmatch.gs
/** Dummy data
gslondon@yahoo.ca Thomas Bolan  
csilvers@hotmail.com Rafael Ridgley  
north@yahoo.com Shoshana Zarrella  
garyjb@live.com Shavon Cales  
euice@att.net Mirian Fasano  
scitext@att.net Wilfred Patch  
ingolfke@live.com Allan Bankes  
johndo@hotmail.com Edwin Acheson  
gozer@gmail.com Emanuel Oriley  
@theevilhead
theevilhead / servewifi.md
Last active Nov 18, 2017
Serve vue js webpack templet dev server over wifi to all your local devices.
View servewifi.md

change the 'localhost' to 'http://192.168.0.1/' everywhere in the file build/dev-server.js

depengind the on the port number visit the ip on your local devices. This is best way thatn going with ngrok tunnel as it uses your data and reloads will take time.

View gist:2b1f20e99d8075eaf66f8ed673660190
#smooth way to install scikit learn on python 2.6
# Install miniconda from http://conda.pydata.org/miniconda.html
# Now run the script
bash ./location-pf-the-script.sh
#It will install mini conda
# Now run
@theevilhead
theevilhead / gist:7ac2fbc3cda897ebd87dbe9aeac130d6
Created Apr 24, 2016
easiest way to detect direction of drag
View gist:7ac2fbc3cda897ebd87dbe9aeac130d6
var dragStartX;
var dragStartY;
window.addEventListener("dragstart",function(e){
dragStartX = Math.ceil(e.offsetX/70);
dragStartY = Math.ceil(e.offsetY/70);
})
window.addEventListener("dragend",function(e){
var dropX = Math.abs(dragstartX - e.screenX);
You can’t perform that action at this time.