Skip to content

Instantly share code, notes, and snippets.

@prashanthca
prashanthca / clicknupload.py
Created September 2, 2020 11:21
clicknupload
import requests,sys,re
from bs4 import BeautifulSoup
url = sys.argv[1]
fid = re.search("""(http|https)(.*?)clicknupload\.(.*?)\/(.*?)$""", url).group(4)
payload = "op=download2&id="+fid+"&rand="+fid+"&referer=&method_free=Free+Download+%3E%3E&method_premium=&adblock_detected=0"
headers = {'content-type': "application/x-www-form-urlencoded" }
@prashanthca
prashanthca / rclone-install.sh
Last active April 5, 2020 06:13
rclone local install
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
download_link="https://downloads.rclone.org/rclone-current-linux-amd64.zip"
cd
mkdir -p .rclone/bin
@prashanthca
prashanthca / CloverTheme-Icons
Last active February 22, 2020 12:52
CloverTheme-Icons
Theme
@prashanthca
prashanthca / pcloud-transfer.sh
Last active August 16, 2019 11:25
pcloud-transfer.sh
#!/bin/bash
ptransfer() {
matched_files=( $1 )
ufile="${matched_files[0]}"
if [ -e "$ufile" ]
then
echo "curl -F receivermails=$2 -F sendermail=$2 -F ppaccepted=yes -F language=en -F ts=1565946871 -F sig=a12385a5944d61875b1874e00af630590fc09cca -F \"files=@$ufile\" https://api.pcloud.com/uploadtransfer > o;cat o;rm o"
curl -F receivermails=$2 -F sendermail=$2 -F ppaccepted=yes -F language=en -F ts=1565946871 -F sig=a12385a5944d61875b1874e00af630590fc09cca -F "files=@$ufile" https://api.pcloud.com/uploadtransfer > o;cat o;rm o
else
echo "file not found"
@prashanthca
prashanthca / install-webtorrent-cli.js
Created April 23, 2019 13:22
Install webtorrent cli tool via a node.js script
var npm = require('npm');
npm.load(function(err) {
npm.commands.install(['webtorrent-cli'], function(er, data) {
console.log(er);
});
npm.on('log', function(message) {
console.log(message);
});
});
/*
* smc_read.c: Written for Mac OS X 10.5. Compile as follows:
*
* gcc -Wall -o smc_read smc_read.c -framework IOKit
*/
#include <stdio.h>
#include <IOKit/IOKitLib.h>
typedef struct {
import requests,sys,re,md5
from bs4 import BeautifulSoup
url = sys.argv[1]
print(url)
fid = re.search("""http(.*?)cloudyfiles\.(.*?)\/(.*?)$""", url).group(3)
md5hash = md5.new()
md5hash.update(url)
md5hash.hexdigest()
# Mount the installer image
hdiutil attach ./Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
# Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Mavericks
# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Mavericks.sparseimage
# Mount the sparse bundle for package addition
@prashanthca
prashanthca / get_ovpns.py
Created May 18, 2017 18:35
Get OVPN files from CSV
import csv, requests, base64, unicodedata
import os
from datetime import datetime
dt = datetime.utcnow()
# Temporary folder name
tmp_folder = str(dt.month)+str(dt.day)+str(dt.year)+'_'+str(dt.hour)+str(dt.minute)+str(dt.second)
# Create necessary folders
@-moz-document domain("reddit.com") {
a.pretty-button, a.pretty-button.neutral, .big-mod-buttons .pretty-button, .link.spam, .comment.noncollapsed > .entry .usertext.border > .usertext-body, .users-online:before, .sidebox .spacer {
background: none;
}
.morelink, .morelink:hover, .flairselection > .linkflair > a:hover,
.flairselection > .flairremove > a:hover, .res .comment.noncollapsed > .entry.RES-keyNav-activeElement .md, .res .morerecursion > .entry.RES-keyNav-activeElement,
.res .morechildren > .entry.RES-keyNav-activeElement,
.res .comment.collapsed > .entry.RES-keyNav-activeElement, .res #RESDashboardAddComponent, .res.res-commentBoxes .comments-page .nestedlisting .comment, .res.res-commentBoxes .comments-page .nestedlisting .comment .comment, .res.res-commentBoxes .comments-page .nestedlisting .comment .comment .comment, .res.res-commentBoxes .comments-page .nestedlisting .comment .comment .comment .comment, .res.res-commentBoxes .comments-page .nestedlisting .comment .comment .comment