This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
┌───────────────────┬────┬──────┬──────┬─────────┬─────────┬────────┬─────┬────────┬──────────┐ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"id": 11, | |
"name": "Test", | |
"type": "physical", | |
"sku": "TEST-TEST", | |
"description": "<p>Awesome product</p>", | |
"weight": 1, | |
"width": 10, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## 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 ########################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "zlib" | |
# total percentage = 100 | |
PER_1 = 20 | |
PER_2 = 30 | |
PER_3 = 50 | |
ids = [*(1..1000)].map(&:to_s) | |
libs = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PER_1 = 20 | |
PER_2 = 35 | |
PER_3 = 45 | |
POOL_SIZE = 10 | |
ids = [*(1..1000)] | |
a1 = (PER_1 / POOL_SIZE).ceil | |
a2 = (PER_2 / POOL_SIZE).ceil | |
a3 = POOL_SIZE - a1 - a2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "csv" | |
require "byebug" | |
class ParseCSV | |
attr_reader :file, :store, :table | |
def initialize(file_path) | |
@file = CSV.read(file_path, headers: true, row_sep: :auto) | |
@table = CSV.read("table.csv", headers: true, row_sep: :auto) | |
@store = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rotator | |
attr_accessor :id, :values | |
BASE = 10 | |
def initialize(id, values) | |
@id = id | |
@values = values | |
end | |
def rotate |
OlderNewer