Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@SantoshSrinivas79
SantoshSrinivas79 / Downloading Torrents from the Ubuntu command-line.md
Last active September 27, 2023 02:44
Downloading Torrents from the Ubuntu command-line

Downloading Torrents from the Ubuntu command-line

This is WIP!

Let us look at the options available to torrent from the ubuntu command line.

I tried out multiple options and my favorite is Transmission - A fast, easy and free BitTorrent Client

Lets say you wan't to download MacTeX - TeX Users Group using the torrent link.

@SantoshSrinivas79
SantoshSrinivas79 / pyrocms-permissions.sh
Last active August 7, 2022 11:11
Fix PyroCMS File & Folder Permissions All-In-One
sudo chmod -R 777 system/cms/cache
sudo chmod -R 777 system/cms/config
sudo chmod -R 777 addons
sudo chmod -R 777 system/cms/cache
sudo chmod -R 777 uploads
sudo chmod -R 666 system/cms/config/config.php
@SantoshSrinivas79
SantoshSrinivas79 / n8n-deployment.yml
Created October 2, 2021 06:16 — forked from bacarini/n8n-deployment.yml
N8N - Kubernetes complete configuration
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: n8n-deployment
namespace: standard
labels: &labels
app: n8n
component: deployment
spec:
@SantoshSrinivas79
SantoshSrinivas79 / Running electron using xvfb.md
Last active September 1, 2021 16:51
Running electron using xvfb

Running electron using xvfb

Install xvfb

apt-get install xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps

Some tips at: xvfb init script for Ubuntu

@SantoshSrinivas79
SantoshSrinivas79 / Inject javascript into HTML pages from console.md
Last active May 12, 2021 05:51
Inject javascript into HTML pages from console

#Inject javascript into HTML pages from console

An easy way to inject Javascripts into the current loaded dom using the developer console in chrome.

jQuery

var script = document.createElement('script');
script.src = 'http://code.jquery.com/jquery-1.7.2.min.js';
@SantoshSrinivas79
SantoshSrinivas79 / Using the command line on a terminal like a pro.md
Last active December 13, 2020 02:32
Using the command line on a terminal like a pro

Using the command line on a terminal like a pro

The terminal is extremely powerful and it is now my topmost choice in coding. Here are some useful commands for common tasks that will hopefully help appreciate the power of the command line!

  • List files sorted by time
    • ls -lt
  • List of files sorted by size
    • ls -alS
  • List of files from s3 ... only name:
  • s4cmd ls s3://tempbin/ | grep zerod_archive_ | awk '{print $NF}' | head
@SantoshSrinivas79
SantoshSrinivas79 / gist:f6f68bc11f5a5d1956af5a99fd639c40
Created September 20, 2020 15:45 — forked from kitek/gist:1579117
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
@SantoshSrinivas79
SantoshSrinivas79 / daily coding post to demonstrate using ggtext.R
Last active February 21, 2020 06:08
daily coding post to demonstrate using ggtext
# daily coding post to demonstrate using ggtext
# credit: late night watch of [Spruce up your ggplot2 visualizations with formatted text? - Claus Wilke](https://resources.rstudio.com/rstudio-conf-2020/spruce-up-your-ggplot2-visualizations-with-formatted-text-claus-wilke)
# Inspired by:
# https://gist.github.com/gkaramanis/a18438d624e495784af38932650c6abe
# https://twitter.com/geokaramanis/status/1230549592103456769?s=20
# remotes::install_github("wilkelab/ggtext")
library(ggplot2)
ggplot(data = data.frame(x = c(-4, 6)), aes(x)) +
stat_function(fun = dnorm, n = 101, args = list(mean = 0, sd = 1), geom = "area", fill = "#F5BB87", alpha = 0.9) +
stat_function(fun = dnorm, n = 101, args = list(mean = 2.7, sd = 1), geom = "area", fill = "#BBD4EB", alpha = 0.9) +
coord_fixed(xlim = c(-5, 7), ratio = 8, clip = "off") +
annotate("segment", x = -3.9, y = 0, xend = 6, yend = 0, color = "grey60", size = 1.3) +
annotate("segment", x = -3.5, y = -0.04, xend = -3.5, yend = 0.42, color = "grey60", size = 1.3) +
annotate("text", x = 0, y = 0.18, label = "what people\nactually do\nin R", family = "Arial Bold", color = "white", size = 5.2) +
annotate("text", x = 2.75, y = 0.18, label = "what people\nassume others\ndo in R", family = "Arial Bold", color = "white", size = 5.2) +
@SantoshSrinivas79
SantoshSrinivas79 / Ghost - Box Spread Analysis on NSE.md
Last active February 16, 2019 06:55
Ghost - Box Spread Analysis on NSE