Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View bantya's full-sized avatar
🎯
Focussing

Rahul Thakare bantya

🎯
Focussing
  • http://127.0.0.1:4200
  • http://127.0.0.1:8080
  • 22:01 (UTC -12:00)
  • X @rkkth
View GitHub Profile
@bantya
bantya / countrys_flags.js
Last active January 3, 2024 21:15
Javascript : Flags of the countries
/**
* All flags are thankfuly taken from http://flagpedia.net/
* Flag lovers should definitely check it out..
*
* User can modify this list as per his/her need..
*
* - Rahul K. Thakare
* INDIA
* rahulthakare1504@gmail.com
* github.com/bantya
@bantya
bantya / clear_apps_icon_cache.bat
Created November 6, 2017 09:52
bat: clear windows apps icon cache
@echo off
:: ie4uinit.exe -show
ie4uinit.exe -ClearIconCache
taskkill /IM explorer.exe /F
del /A /Q "%localappdata%\IconCache.db"
del /A /F /Q "%localappdata%\Microsoft\Windows\Explorer\iconcache*"
shutdown /r /f /t 00
@bantya
bantya / object-watch.js
Created January 23, 2023 18:17 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@bantya
bantya / cdir.bat
Last active October 31, 2022 17:53
BAT: My custom bat commands to make life easier.
@echo off
:: Author: Rahul Thakare
:: Email: rahulthakare1504@gmail.com
:: Github: www.github.com/bantya
:: Purpose: Easy change directory command for cmd
:: Created: 23062017
set Dir=%1
@bantya
bantya / setup-mysql-8.md
Created October 16, 2019 11:56
Setup MySQL 8
  1. Install MySQL-8.0 from [here].

  2. Open Terminal and go to /MySQL-8.0/bin directory.

  3. Run mysqld --initialize.

    This will initialize the mysql data directory at location specified in /MySQL-8.0/my.ini file; if not, it will initialize the data directory inside /MySQL-8.0/data.

  4. Run mysqld --console command.

@bantya
bantya / perlin-noise-classical.js
Created June 2, 2022 12:57 — forked from banksean/perlin-noise-classical.js
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/
@bantya
bantya / php-webscraping.md
Created July 22, 2018 15:23 — forked from anchetaWern/php-webscraping.md
web scraping in php

Have you ever wanted to get a specific data from another website but there's no API available for it? That's where Web Scraping comes in, if the data is not made available by the website we can just scrape it from the website itself.

But before we dive in let us first define what web scraping is. According to Wikipedia:

{% blockquote %} Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs simulate human exploration of the World Wide Web by either implementing low-level Hypertext Transfer Protocol (HTTP), or embedding a fully-fledged web browser, such as Internet Explorer or Mozilla Firefox. {% endblockquote %}

@bantya
bantya / changelog.rb
Created January 2, 2022 11:13 — forked from ttscoff/changelog.rb
Generate release notes from git commit messages
#!/usr/bin/ruby
# A script to automate changelog generation from Git commit messages
#
# For use with a git-flow workflow, it will take changes from the last tagged release
# where commit messages contain NEW, FIXED, and IMPROVED keywords and sort and fromat
# them into a Markdown release note list.
#
# The script takes version information from the macOS command agvtool and bases
# the product name on the first matching Xcode Info.plist found
@bantya
bantya / barchart.rb
Created January 2, 2022 10:40 — forked from ttscoff/barchart.rb
Command line bar chart from JSON data (for GeekTool, et al)
#!/usr/bin/env ruby
# encoding: utf-8
# Brett Terpstra 2013, WTF license <http://www.wtfpl.net/txt/copying/>
# Outputs a vertical bar chart from date-based JSON data
# Requires the JSON rubygem: `[sudo] gem install json`
require 'date'
require 'open-uri'
require 'rubygems'
require 'json'
@bantya
bantya / USAGE
Last active October 17, 2021 18:53
Convert sublime snippets to vscode.
php snippets.php [SNIPPETS_DIRECTORY]
e.g. php snippets.php vue
SNIPPETS_DIRECTORY: Assuming that the snippets are categorized in directories (preferably by languages) and snippet directories and the script have the same parent directory.
e.g.
/snippets
|
+--- snippets.php
|
+--- /php