Skip to content

Instantly share code, notes, and snippets.

@addminuse
addminuse / Forwarding.py
Created December 2, 2015 09:02
Enable port forwarding using this simple python script.
#/usr/bin/python
# if yes or no doesn't work try using quotes
# example 'yes' or 'no'
import os
import sys
@TomasKulhanek
TomasKulhanek / pythonwebdesktop.py
Last active January 11, 2022 05:22
Desktop background (linux,windows) as web page using python, webkit and proxy settings
#!/usr/bin/env python
# desktop background as web page using webkit and proxy settings
# https://kmandla.wordpress.com/2010/05/24/the-1-2kb-python-browser-script/
# - proxy support is included in webkit no need of -- http://stackoverflow.com/questions/6915840/python-webkit-with-proxy-support
# http://superuser.com/questions/419195/set-an-html-page-as-the-wallpaper-on-linux
import sys
import gtk
import webkit
import webbrowser
@streetgt
streetgt / youtube_comment_bot.py
Last active January 15, 2022 13:04
Youtube Comment Bot - python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python bot for comment a list of urls in YouTube
import time
import numpy as np
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Python Spintax parser
This module provides an efficient spintax parser where every possible spuns have the same probability.
Given a masterspin you can get the total number of possible spuns or a randomly chosen spun.
"""
@gipi
gipi / roundcube
Created December 28, 2011 10:49
ROUNDCUBE: Init script for PHP CGI and nginx configuration file.
#!/bin/sh
### BEGIN INIT INFO
# Provides: php-cgi
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Make available a cgi for nginx
# Description: primarly is used for the wordpress installation
### END INIT INFO
@oro350
oro350 / rawfilter.c
Created January 5, 2014 15:46
SO_ATTACH_FILTER usage
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/ethernet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <netpacket/packet.h>
@sta1r
sta1r / wp-strip-css-js
Created July 18, 2012 16:57
Removing Wordpress plugin scripts and styles
/* Remove plugin CSS & JS */
/* Next Gen Gallery */
function dequeue_nextGen_style() {
wp_dequeue_style('NextGEN');
}
add_action('template_redirect', 'dequeue_nextGen_style');
function dequeue_nextGen_js() {
if (!is_singular()) {
@williamgomes
williamgomes / config
Last active June 30, 2023 12:20
Nginx Config for Wordpress
###########
paste this inside virtual host file /etc/nginx/sites-available/<YOUR CONFIG FILE>
###########
server {
listen 80;
server_name <DOMAIN_OR_HOST_NAME>;
root /var/www/html/<FOLDER_NAME>;
@AntonOrlov
AntonOrlov / install.sh
Last active July 5, 2023 10:29
3proxy installation script for CentOS 7.2.1511
yum install 3proxy;
curl https://gist.githubusercontent.com/AntonOrlov/a70aeed276d35dc9d77060b0a6c167ed/raw -o /etc/3proxy.cfg;
chmod 644 /etc/3proxy.cfg;
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-port=9000/tcp --permanent
systemctl enable 3proxy.service;
systemctl restart 3proxy.service;
@alexdrean
alexdrean / vimeo-downloader.js
Last active July 20, 2023 22:23 — forked from aik099/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// (done automatically now) 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
const { exec } = require('child_process');