Skip to content

Instantly share code, notes, and snippets.

View charusat09's full-sized avatar

Mayurkumar charusat09

View GitHub Profile
########## wireless info START ##########
Report from: 10 Mar 2018 10:40 IST +0530
Booted last: 10 Mar 2018 10:33 IST +0530
Script from: 10 Jan 2018 20:04 UTC +0000
##### release ###########################
var delay = 5 * 1000; // will sleep for 5 seconds
// add sites in this array with comma seperated
var values = [
"https://www.google.com",
"https://linkedin.com"
];
for (var i = 0; i < values.length; i++) {
sleep(delay);
@charusat09
charusat09 / nginx-default-file-example
Created August 21, 2017 11:46
This is example for /etc/nginx/sites-available/default file
upstream puma {
server unix:///var/www/apps/PROJECT/shared/sockets/puma.sock;
}
server {
listen 80;
server_name 'example.com';
# Discourage deep links by using a permanent redirect to home page of HTTPS site
#return 301 https://$host;
@charusat09
charusat09 / deploy.rb
Last active October 23, 2019 00:24 — forked from dsandstrom/deploy.rb
Compile assets locally with capistrano 3.5.0 and rails 4.2.x (Nginx-Unicorn zero downtime)
# Runs rake assets:clean
# Defaults to nil (no asset cleanup is performed)
# If you use Rails 4+ and you'd like to clean up old assets after each deploy,
# set this to the number of versions to keep
set :keep_assets, 2
set :user, 'ubuntu'
set :pem_file, %w(/home/mayur/.ssh/pem/dev.pem)
set :ssh_options, {
# Gemfile
gem 'capistrano', require: false
gem 'capistrano-rvm', require: false
gem 'capistrano-rails', require: false
gem 'capistrano-bundler', require: false
gem 'capistrano3-puma', require: false
# Capfile
@charusat09
charusat09 / gist:dcda5f7778867c9c3e4e1ab54886c056
Created December 19, 2016 08:46
BigCommerce Product response
{
"data": [
{
"id": 11,
"name": "Test",
"type": "physical",
"sku": "TEST-TEST",
"description": "<p>Awesome product</p>",
"weight": 1,
"width": 10,
Mayur~/Desktop/Mayur/VS/pickk-pickk-import-cbcb1245fdee pm2 start pm2/actors.dev.json
[PM2][WARN] You are starting 1 processes in fork_mode without load balancing. To enable it remove -x option.
[PM2][WARN] You are starting 1 processes in fork_mode without load balancing. To enable it remove -x option.
[PM2] Applying action restartProcessId on app [ImportGames](ids: 0)
[PM2][ERROR] Process 0 not found
Process not found
[PM2] Applying action restartProcessId on app [ImportFutureGames](ids: 1)
[PM2][ERROR] Process 1 not found
Process not found
┌───────────────────┬────┬──────┬──────┬─────────┬─────────┬────────┬─────┬────────┬──────────┐