Skip to content

Instantly share code, notes, and snippets.

View kitwalker12's full-sized avatar

Kunwar Aditya Raghuwanshi kitwalker12

View GitHub Profile
@lalyos
lalyos / README.md
Last active September 8, 2020 07:52
make s3 bucket public script

Public aws s3 bucket

Sometimes you want to make a specific s3 bucket public. My purpose was to host a maven repo on s3.

one-liner

So if you want to make a bucket and all its files available publicly, just run this:

curl -Lso public-bucket.sh  j.mp/public-bucket && chmod +x public-bucket.sh && ./public-bucket.sh
@davebrace
davebrace / install_neo4j_codeship.sh
Last active May 3, 2021 23:56
Install Neo4j (2.1.5) on Codeship running on specific ports
# Put the following lines in your Codeship Setup section
## Install Neo4j
wget -O neo4j-community-2.1.5.tar.gz http://neo4j.com/artifact.php?name=neo4j-community-2.1.5-unix.tar.gz
tar -xzvf neo4j-community-2.1.5.tar.gz
# configure neo4j to run on testing ports (7476 + 7475)
sed -i s/7474/7476/g neo4j-community-2.1.5/conf/neo4j-server.properties
sed -i s/7473/7475/g neo4j-community-2.1.5/conf/neo4j-server.properties
neo4j-community-2.1.5/bin/neo4j start
bundle exec rspec spec --tag data_store:neo4j
@just3ws
just3ws / vcr.rb
Created November 5, 2014 15:02
VCR configuration that does a pretty good job of filtering out GitHub, Twitter, and LinkedIn keys.
VCR.configure do |c|
c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
c.hook_into :webmock
c.ignore_localhost = true
c.default_cassette_options = { record: :new_episodes }
c.allow_http_connections_when_no_cassette = false
c.configure_rspec_metadata!
c.ignore_hosts 'codeclimate.com'
@steve-jansen
steve-jansen / export-zone.sh
Created December 15, 2014 19:11
Export DNS records from Rackspace Cloud DNS to zone files on disk
#!/bin/bash
# exports DNS records from Rackspace Cloud DNS to text files
# Depends on https://github.com/wichert/clouddns/blob/master/src/clouddns.py
set -e
me=export-zone
base_domain=
rackspace_region=
rackspace_rate_limit_delay=3
@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
@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

@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:
version: '2'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
@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

@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