Skip to content

Instantly share code, notes, and snippets.

View rousan's full-sized avatar
:shipit:
Building products

Rousan Ali rousan

:shipit:
Building products
View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
Row ID,Order ID,Order Date,Ship Date,Ship Mode,Customer ID,Customer Name,Segment,Country/Region,City,State,Postal Code,Region,Product ID,Category,Sub-Category,Product Name,Sales,Quantity,Discount,Profit
1,CA-2019-152156,11/8/2019,11/11/2019,Second Class,CG-12520,Claire Gute,Consumer,United States,Henderson,Kentucky,42420,South,FUR-BO-10001798,Furniture,Bookcases,Bush Somerset Collection Bookcase,261.96,2,0,41.9136
2,CA-2019-152156,11/8/2019,11/11/2019,Second Class,CG-12520,Claire Gute,Consumer,United States,Henderson,Kentucky,42420,South,FUR-CH-10000454,Furniture,Chairs,"Hon Deluxe Fabric Upholstered Stacking Chairs, Rounded Back",731.94,3,0,219.582
3,CA-2019-138688,6/12/2019,6/16/2019,Second Class,DV-13045,Darrin Van Huff,Corporate,United States,Los Angeles,California,90036,West,OFF-LA-10000240,Office Supplies,Labels,Self-Adhesive Address Labels for Typewriters by Universal,14.62,2,0,6.8714
4,US-2018-108966,10/11/2018,10/18/2018,Standard Class,SO-20335,Sean O'Donnell,Consumer,United States,Fort Lauderdale,Fl
@rousan
rousan / CoinMarketCap Extra Actions.md
Last active December 4, 2021 06:49
It will add extra actions to CoinMarketCap.com website and it helps to view the coin information in same window.

CoinMarketCap Extra Actions

It will add extra actions to CoinMarketCap.com website and it helps to view the coin information in same window.

const EXTRA_ACTIONS_CLASSNAME = "coin-extra-actions";
const POPUP_CONTAINER_CLASSNAME = "coin-extra-popup-container";
const renderChanges = () => {
  const coinElems = document.querySelectorAll(".sc-16r8icm-0.escjiH");
  [...coinElems].forEach((coinElem) => {
    if (!coinElem.querySelector(`.${EXTRA_ACTIONS_CLASSNAME}`)) {

How to execute the .bashrc file with command running through SSH login?

I wanted to use command

ssh myhost.com 'some_command' and some_command exists in /var/some_location so I tried to append /var/some_location in $PATH environment by editing $HOME/.bashrc

but that wasn't working. because default .bashrc(Ubuntu 10.4 LTS) prevent from sourcing by code like below:

# If not running interactively, don't do anything
@rousan
rousan / README.md
Created July 17, 2021 14:29
How to add .service file in Ubuntu?

How to add .service file in Ubuntu?

  1. Write the my-server.service file name with the following content:
[Unit]
Description=Some description about the app.

[Service]
User=www-data
@rousan
rousan / app.md
Last active September 29, 2020 03:19
Solution: sum(1)(2)(3)(10)() = 16

Solution: sum(1)(2)(3)(10)() = 16

  1. Solution 1: Cache the value in the function itself. But, It will not work when the function is called multiple times at the same time.
function sumAggr(num) {
  if (sumAggr.sum === undefined) {
 sumAggr.sum = 0;
@rousan
rousan / nginxproxy.md
Created July 26, 2020 10:12 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

Install Nginx and Let's Encrypt on fresh VPS

/etc/systemd/system/neo.service

  • After creating a fresh VPS instance, Run:
$ sudo apt-get update && apt-get upgrade
@rousan
rousan / README.md
Last active July 17, 2021 14:31
Algorithms to solve a 3x3 rubiks cube

Algorithms to solve a 3x3 rubiks cube

Algorithms:
1. The Righty Alg: R U Ri Ui
2. The Lefty Alg: Li Ui L U
3. Spin Right: rotote whole cube by 90deg in closewise
4. Spin Left: rotote whole cube by 90deg in anti-closewise
@rousan
rousan / script-export.js
Last active March 2, 2020 10:05
Scripts to import/export slack messages from/to a conversation or a channel
const fs = require("fs-extra");
const axios = require("axios");
const webhookUrl = "webhook_url_for_the_destination_conversation_or_channel_of_the_app_created_on_the_destination_slack_Workspace";
(async function () {
const messages = fs.readJSONSync('./messages.json');
for (const m of messages) {
// const { text } = m;
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="width=device-width" name="viewport" />
<meta content="IE=edge" http-equiv="X-UA-Compatible" />