Skip to content

Instantly share code, notes, and snippets.

View milindsingh's full-sized avatar
:octocat:
building innovative products

Milind Singh milindsingh

:octocat:
building innovative products
View GitHub Profile
@varun160490
varun160490 / cowin_vaccination_autobooking.js
Last active June 29, 2021 12:38
Working script to book a vaccination slot on console as soon as a slot opens up in https://selfregistration.cowin.gov.in/
// This javascript code will alert you and immediately book the slot whenever a slot opens up on the given date within the given pincodes.
// **** THIS SCRIPT IS TO MAKE NEW BOOKING FOR DOSE 1 OR DOSE 2. IN CASE OF RESCHEDULE, FIRST CANCEL THE BOOKING AND THEN TRY TO BOOK USING THIS SCRIPT. ****
// **** RUN SCRIPT 5 MINUTES BEFORE THE SLOT OPENING TIME. IF THE SESSION IS EXPIRED (EXPIRES IN 10-15 MINUTES), LOG IN AND RERUN THE SCRIPT. ****
// Steps to use
// 1. Update pincodes,age,district_id,beneficiaries,dose,vaccine & vaccine_date.
// 2. Login to https://selfregistration.cowin.gov.in/
// 3. Right Click on the website
// 4. Click on Inspect
<?
# MIT license, do whatever you want with it
#
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
#
require_once(__DIR__.'/../vendor/autoload.php');
@magento-docbot
magento-docbot / module-readme-template.md
Last active January 15, 2020 20:08
README template for Magento modules
@gregawoods
gregawoods / amazon.rake
Last active November 1, 2022 12:22
Recursively download XSD documents for use with Amazon MWS.
require 'nokogiri'
namespace :amazon do
desc 'Download XSD files recursively'
task xsd: :environment do
dest = download_xsd_file(
'amzn-envelope.xsd',
'https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_1_9/'
)
# Validate schema
@bh3605
bh3605 / knockout.recaptcha.js
Created September 28, 2017 18:52
knockout way of building a recaptcha
/**
* Make sure your page is using <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
* or if you're using <script src="https://www.google.com/recaptcha/api.js" async defer></script> then comment out
* Recaptcha.create and uncomment the grecaptcha.render.
* based on http://jsfiddle.net/jaGWY/
* docs: https://developers.google.com/recaptcha/intro & http://recaptchamvc.apphb.com/Home/Document
*/
var app = app || {};
app.knockout = app.knockout || {};
@0-Sony
0-Sony / WebsiteAndStoreCreator.php
Last active June 19, 2024 17:20
Magento 2 : Create Programmatically Website/Store/StoreGroup
<?php
/**
* This file is part of Namespace for Magento.
*
* @license All rights reserved
* @author Phuong LE <phuong.le@agence-soon.fr> <@>
* @category Namespace
* @package Namespace_Core
* @copyright Copyright (c) 2016 Agence Soon (http://www.agence-soon.fr)
*/
@derak-kilgo
derak-kilgo / order-uncancel.php
Created October 7, 2016 17:09
One-off tool to uncancel an order in magento 1.x
<?php
if(php_sapi_name()!=="cli"){
echo "Must be run from the commend line.";
};
/**
* Setup a magento instance so we can run this export from the command line.
*/
require_once('app/Mage.php');
umask(0);
if (!Mage::isInstalled()) {
@ankurk91
ankurk91 / install_lamp_ubuntu.sh
Last active July 6, 2024 03:45
Ubuntu 22/24 - PHP development (php 7.4 / 8.3, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu Server
# Run like (without sudo) - bash install_lamp.sh
# Script should auto terminate on errors
export DEBIAN_FRONTEND=noninteractive
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE