Skip to content

Instantly share code, notes, and snippets.

View kitwalker12's full-sized avatar

Kunwar Aditya Raghuwanshi kitwalker12

View GitHub Profile
@bryant988
bryant988 / zillow.js
Last active November 14, 2024 02:46
Zillow Image Downloader
/**
* NOTE: this specifically works if the house is for sale since it renders differently.
* This will download the highest resolution available per image.
*/
/**
* STEP 1: Make sure to *SCROLL* through all images so they appear on DOM.
* No need to click any images.
/* preventScrollWhenSoftKeyboardAppearsIfThereIsPlentyOfRoom(event)
*
* Attach this handler to `touchstart` on any UI control that brings up the keyboard when you don't want iOS
* MobileSafari to scroll when a user taps it. Assumes that the input is near the top of the page and the user has
* not scrolled down (specific to my case, sorry!)
*
* requires top-level CSS directives so we can add it to the body:
* ```
* .prevent-ios-focus-scrolling {
* position: fixed;
@davidmfoley
davidmfoley / docker-compose.yml
Last active May 4, 2018 18:46
Sample wordpress docker compose setup for local development
version: '3'
services:
db:
image: mysql:5.7
volumes:
- site_db_data:/var/lib/mysql
restart: always
ports:
# bind to host port so we can run mysql tools on host
@vpadhariya
vpadhariya / clone site using wget.txt
Created January 23, 2018 07:57
Clone site and remove query string values from the files in linux.
# Clone entire site.
wget --content-disposition --execute robots=off --recursive --no-parent --continue --no-clobber http://example.com
# Remove query string from a static resource.
for i in `find $1 -type f -name "*\?*"`; do mv $i `echo $i | cut -d? -f1`; done
@yalab
yalab / bootstrap-memo.md
Last active July 20, 2022 20:29
rails5 + webpacker + bootstrap
$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.js
diff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644
@tony-caffe
tony-caffe / Contract Killer 3.md
Last active June 12, 2024 17:44
The latest version of Bytes Unlimited ‘Contract Killer’ for web professionals

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Revised by Bytes Unlimited : Feb 3rd 2020

version: '2'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
@anosulchik
anosulchik / 101splunk-fowarder.config
Last active July 21, 2022 18:41
Universal Language: Logs collection from AWS Elasticbeanstalk into Splunk: 101splunk-fowarder.config
container_commands:
01install-splunk:
command: /usr/local/bin/install-splunk.sh
02set-splunk-server-host:
command: /usr/local/bin/set_splunk_server_host.sh "$SPLUNK_SERVER_HOST"
03add-logs-to-splunk:
command: /usr/local/bin/add_logs_to_splunk.sh "$ENVIRONMENT_NAME"
cwd: /root
ignoreErrors: false
files:
@kitwalker12
kitwalker12 / .0-Rails-Tutum.md
Last active September 14, 2016 17:58
Dockerized Rails on Tutum (Passenger + HAProxy)

How to deploy rails in tutum as a production server behing HAproxy on Passenger

docker build -t 'my_image_name:latest' . && tutum image push my_image_name:latest

@50kudos
50kudos / flashflush.sh
Last active November 3, 2019 02:03
A Bash script that lists all unused css classes in html/haml/erb files for rails project (or maybe others depending on project structure)
#!/bin/bash
cat $(find app/assets/stylesheets/ -type f) |
grep -Eo '\.[a-z]+[a-z0-9_-]*' | sort | uniq | sed s/.// |
while read CSS; do
if ! grep -Erqi "([^(remove|has)]?class[(:|=|[:space:]*=>[:space:]*)]*[[:space:]\W]*[(\"|')]*[-a-z0-9[:space:]]*$CSS|\\.$CSS\b)" app/views/ vendor/assets/ app/assets/javascripts/; then
echo $CSS >> unused.scss;
fi
done