Skip to content

Instantly share code, notes, and snippets.

View sc0rp10n-py's full-sized avatar
😎

Pragyan sc0rp10n-py

😎
View GitHub Profile
@sc0rp10n-py
sc0rp10n-py / steps.md
Last active September 11, 2024 06:31

Steps to Setup Personal Access Token

  1. go to this url - click
  2. click "Generate New Token (Classic)"

Don't click beta one

  1. It will ask you to enter your github password, enter that

  2. Then this screen will come

@sc0rp10n-py
sc0rp10n-py / loader.jsx
Created January 20, 2023 00:41
Loader animation ExtendScript After Effects
app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
app.newProject();
app.beginUndoGroup("Create Comp");
/////////////////////////////
// settings
var width = 1920;
var height = 1080;
var duration = 10;
@sc0rp10n-py
sc0rp10n-py / install.sh
Created November 20, 2022 00:15
Automated script to download, build and install ns3
#!/bin/sh
echo "Script to Download, Build and Install ns3 by nsnam.org"
echo "Downloading script"
wget https://www.nsnam.org/releases/ns-allinone-3.37.tar.bz2
echo "Extracting the archive"
tar -xvf ns-allinone-3.37.tar.bz2
echo "Building and testing ns3"
cd ns-allinone-3.37
cd ns-3.37
@sc0rp10n-py
sc0rp10n-py / index.js
Created March 29, 2022 15:21
nodemailer eg
const express = require("express");
const bodyParser = require("body-parser");
const mysql = require("mysql"); //as we use a MySQL database
const nodemailer = require("nodemailer"); //to send mails
var cors = require("cors");
const Server = "aqueous-refuge-02128.herokuapp.com";
const app = express();
app.use(bodyParser.urlencoded({ extended: true }));
@sc0rp10n-py
sc0rp10n-py / Github Webhook Tutorial.md
Created May 23, 2021 20:04 — forked from jagrosh/Github Webhook Tutorial.md
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@sc0rp10n-py
sc0rp10n-py / openinbrowser.py
Created January 2, 2021 18:16 — forked from hakluke/openinbrowser.py
Little Python script to open a list of URLs from a file in browser tabs, n tabs at a time
#! /usr/bin/python3
import webbrowser, sys
if len(sys.argv) < 3:
print("Usage: openinbrowser.py ./urls.txt 20")
quit()
f = open(sys.argv[1])
tabs = int(sys.argv[2])
counter = 1
@sc0rp10n-py
sc0rp10n-py / ex43.py
Last active July 10, 2020 15:34
explanation needed
from sys import exit
from random import randint
class Scene(object):
def enter(self):
print "This scene is not yet configured. Subclass it and implement enter()."
exit(1)
@sc0rp10n-py
sc0rp10n-py / ex35.py
Created July 6, 2020 18:16
ex 35 doubt
from sys import exit
def gold_room():
print "This room is full of gold. How much do you take?"
next = raw_input("> ")
if "0" in next or "1" in next:
how_much = int(next)
else:
dead("Man, learn to type a number.")
import httplib2
import os
import sys
import xml.etree.ElementTree as ET
from apiclient.discovery import build
from apiclient.errors import HttpError
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client.tools import argparser, run_flow
@sc0rp10n-py
sc0rp10n-py / gist:414d847a6bc46545708e86d4b09814da
Created April 22, 2020 03:41 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>