Skip to content

Instantly share code, notes, and snippets.

View verfasor's full-sized avatar
☠️
misfit.

verfasor

☠️
misfit.
View GitHub Profile
@verfasor
verfasor / test
Created December 1, 2017 14:21
test
$ wget --no-check-certificate https://raw.githubusercontent.com/climbthewall/shadowsocks-ec2/master/shadowsocks-all.sh
$ chmod +x shadowsocks-all.sh
$ ./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log
@verfasor
verfasor / qbittorrent-nox.service
Created May 13, 2019 07:03
qbittorrent-nox.service
[Unit]
Description=qBittorrent Command Line Client
After=network.target
[Service]
#Do not change to "simple"
Type=forking
User=qbittorrent-nox
Group=qbittorrent-nox
UMask=007
@verfasor
verfasor / unfollow.js
Last active October 21, 2020 18:02
LinkedIn Unfollow Script
function isHidden(el) {
if(el) return (el.offsetParent === null);
else return false;
}
TotalUnfollowed = 0;
var LoadingAnimation = document.getElementsByClassName("initial-load-animation")[0];
var CatchLoadingAnimation = setInterval(function(){
if(isHidden(LoadingAnimation) == true) {
@verfasor
verfasor / follow.js
Last active November 19, 2019 05:22
function isHidden(el) {
if(el) return (el.offsetParent === null);
else return false;
}
TotalUnfollowed = 0;
var LoadingAnimation = document.getElementsByClassName("initial-load-animation")[0];
var CatchLoadingAnimation = setInterval(function(){
if(isHidden(LoadingAnimation) == true) {
@verfasor
verfasor / extra.php
Created November 21, 2019 09:07
Add this to the bottom of functions.php
/** function to shorten freshness display from say '1 month, 2 weeks' to '1 month'**/
function short_freshness_time( $output) {
$output = preg_replace( '/, .*[^ago]/', ' ', $output );
return $output;
}
add_filter( 'bbp_get_time_since', 'short_freshness_time' );
add_filter('bp_core_time_since', 'short_freshness_time');
/** redirect after login **/
function login_redirect( $redirect_to, $request, $user ){
return home_url('forums');
#!/bin/bash
# This script installs WordPress from Command Line.
#Colors settings
BLUE='\033[0;34m'
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
@verfasor
verfasor / additional.css
Last active April 22, 2022 11:20
Additional CSS for GeneratePress Automatic Dark Mode Template. Visit https://jotzilla.net/dark-mode-generatepress/ for .json file and guide.
.main-navigation {
border-top: 1px solid #efefef;
border-bottom: 1px solid #efefef;
}
code {
background: #72b1db;
color: #fafafa;
padding: 2px;
border-radius: 3px;
}
@verfasor
verfasor / generate-settings-export-12-18-2019.json
Created December 18, 2019 14:55
Site settings for the GeneratePress Automatic Dark Mode Template. Visit https://mighil.com/gp-dark for additional CSS and guide.
{"modules":{"Backgrounds":"generate_package_backgrounds","Blog":"generate_package_blog","Colors":"generate_package_colors","Copyright":"generate_package_copyright","Elements":"generate_package_elements","Disable Elements":"generate_package_disable_elements","Menu Plus":"generate_package_menu_plus","Secondary Nav":"generate_package_secondary_nav","Sections":"generate_package_sections","Spacing":"generate_package_spacing","Typography":"generate_package_typography"},"mods":{"font_body_variants":"regular,italic,700,700italic","font_body_category":"serif","font_site_title_variants":"300,300italic,regular,italic,700,700italic,900,900italic","font_site_title_category":"serif","font_site_tagline_variants":false,"font_site_tagline_category":false,"font_navigation_variants":false,"font_navigation_category":false,"font_secondary_navigation_variants":false,"font_secondary_navigation_category":false,"font_buttons_variants":false,"font_buttons_category":false,"font_heading_1_variants":false,"font_heading_1_category":false,
@verfasor
verfasor / wp-dark.css
Created December 22, 2019 20:16
Dark Mode for WordPress https://mighil.com/wp-dark
/* Visit the attached link for full guide
Now that prefers-color-scheme is available for modern web browsers,
you can use it to enable an automatic dark mode for WordPress websites.
The recommended logic*/
@media (prefers-color-scheme: dark) {
body {
background-color: #121212;color: #fafafa;}}
@verfasor
verfasor / reset.ejs
Last active December 29, 2021 10:58
reset.ejs
silence is golden