Skip to content

Instantly share code, notes, and snippets.

View angeloped's full-sized avatar

Angeloped angeloped

  • Philippines
View GitHub Profile
@bpmore
bpmore / dates.txt
Created March 8, 2018 21:08
National & Global Holiday Calendar: 2018-2019
January 2018
2: Science Fiction Day #ScienceFictionDay
4: National Trivia Day #NationalTriviaDay
5: National Bird Day #NationalBirdDay
8: Clean Off Your Desk Day #CleanOffYourDeskDay
11: Human Trafficking Awareness Day #HumanTraffickingDay
13: National Sticker Day #NationalStickerDay
15: Martin Luther King, Jr. Day #MLKDay
National Hat Day #NationalHatDay
18: Get to Know Your Customers Day (third Thursday of every quarter) #GetToKnowYourCustomersDay
@Richienb
Richienb / DownloadFile.vbs
Last active August 9, 2023 08:03
Download A File In Visual Basic Script (vbs)
Sub HTTPDownload( myURL, myPath )
Dim i, objFile, objFSO, objHTTP, strFile, strMsg
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set objFSO = CreateObject( "Scripting.FileSystemObject" )
If objFSO.FolderExists( myPath ) Then
strFile = objFSO.BuildPath( myPath, Mid( myURL, InStrRev( myURL, "/" ) + 1 ) )
ElseIf objFSO.FolderExists( Left( myPath, InStrRev( myPath, "\" ) - 1 ) ) Then
strFile = myPath
Else
WScript.Echo "ERROR: Target folder not found."
@ismailakkila
ismailakkila / ch5_html_form_brute_force.py
Last active November 2, 2022 20:57
ch5_html_form_brute_force.py
#ch5_html_form_brute_force.py
from html.parser import HTMLParser
import urllib.request
import urllib.parse
import http.cookiejar
import queue
import threading
import sys
import os
@Will-777
Will-777 / sigmoidGraph.py
Last active November 13, 2021 09:44
simple sigmoid function with Python
#import section
from matplotlib import pylab
import pylab as plt
import numpy as np
#sigmoid = lambda x: 1 / (1 + np.exp(-x))
def sigmoid(x):
return (1 / (1 + np.exp(-x)))
mySamples = []
@mdonkers
mdonkers / server.py
Last active April 30, 2024 23:26
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@joncardasis
joncardasis / WebServer.py
Created February 7, 2017 21:08
A simple and quick HTTP web server in Python
"""
Author: Jonathan Cardasis
"""
import socket
import signal # Allow socket destruction on Ctrl+C
import sys
import time
import threading
@CricketofLocusts
CricketofLocusts / RemoveFBSponsoredPosts.user.js
Last active July 19, 2022 03:20
A Tampermonkey script to remove Sponsored posts from your newsfeed on Facebook.
// ==UserScript==
// @name Remove FB Sponsored Posts
// @namespace https://gist.github.com/CricketofLocusts/6109689af6c78b5e2ee23258970eaffa.js
// @description A Tampermonkey script to remove Sponsored posts from your newsfeed on Facebook.
// @version 1.21
// @author Cricket
// @include https://www.facebook.com/?ref=tn_tnmn
// @include https://www.facebook.com
// @require http://code.jquery.com/jquery-latest.min.js
// ==/UserScript==
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.pem with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# change to the directory you want to serve and run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
# to add the certificate to Chrome see:
# http://stackoverflow.com/a/15076602/526860
import BaseHTTPServer
/**
* jQuery 2.1.3's parseHTML (without scripts options).
* Unlike jQuery, this returns a DocumentFragment, which is more convenient to insert into DOM.
* MIT license.
*
* If you only support Edge 13+ then try this:
function parseHTML(html, context) {
var t = (context || document).createElement('template');
t.innerHTML = html;
return t.content;
@pakt
pakt / rdwr.py
Created August 15, 2015 10:59
Direct read/write access to Python's memory
#
# read/write access to python's memory, using a custom bytearray.
# some code taken from: http://tinyurl.com/q7duzxj
#
# tested on:
# Python 2.7.10, ubuntu 32bit
# Python 2.7.8, win32
#
# example of correct output:
# inspecting int=0x41424344, at 0x0228f898