Skip to content

Instantly share code, notes, and snippets.

Avatar

ravenstar

  • Australia
View GitHub Profile
View clear_brave_browser.txt
List of things I do in Brave Browser after installing.
1) In welcome tour, make sure you are not using Brave rewards
2) Install ublock origin. While Brave's inbuilt ad-block is good, ublock origin is better.
3) Optional extensions - Video Speed controller, Sponsor block, Advanced Profanity Filter
4) Settings -> Search for "dashboard" -> Customize ... page -> Turn off sponsored images
5) In Newtab page, there are some cards like Binance, Crypto etc.
Click on Edit Cards at the bottom and hide the onnes you don't need
6) Enable Password autogenerate - In brave://settings/braveSync, click start new sync chain -> phone. It will generate QR code
But you don't have to use it. Click on manage your devices. Make sure sync everything is enabled.
@ravenstar
ravenstar / Configure Exim on cPanel to use Mailgun SMTP
Created May 7, 2021 11:36 — forked from rmckeel/Configure Exim on cPanel to use Mailgun SMTP
Method for redirecting all email on a Linux WHM server for one domain to Mailgun for reliable delivery
View Configure Exim on cPanel to use Mailgun SMTP
# This allows you to route all email from a Linux WHM server using exim through the Mailgun service
# or other email service. This is very powerful because email from a server is typically untrusted
# and hard to get good email delivery.
# This is not tested on servers that host multiple domains, because Mailgun's service is specific
# to one domain. If you figure out multiple domains with Mailgun, write it in the comments or fork this!
# Log in to WHM, go to Exim Configuration Manager -> Advanced Editor tab then edit the following.
### NOTE!
# If setting hosts_require_auth and hosts_require_tls = smtp.mailgun.org,
@ravenstar
ravenstar / child-functions-php-snippet.php
Last active July 19, 2018 04:03 — forked from lots0logs/child-functions-php-snippet.php
WordPress :: Divi Theme :: Include Tags In Post Meta When Displayed On Frontend
View child-functions-php-snippet.php
<?php
/* DON'T copy the first line (above) if your functions.php already has it.
* ----------------------------------------------------------------------- */
function et_pb_postinfo_meta( $postinfo, $date_format, $comment_zero, $comment_one, $comment_more ){
$postinfo_meta = '';
if ( in_array( 'author', $postinfo ) )
$postinfo_meta .= ' ' . esc_html__('by', 'et_builder') . ' <span class="author vcard">' . et_pb_get_the_author_posts_link() . '</span>';
if ( in_array( 'date', $postinfo ) ) {
$postinfo_meta .= '<span class="published">' . esc_html(get_the_time(wp_unslash( $date_format) ) ) . '</span>';
View SFTP_upload_on_file_change.ps1
## Install Posh-SSH by running the following from Powershell as Admin:
# iex (New-Object Net.WebClient).DownloadString("https://gist.github.com/darkoperator/6152630/raw/c67de4f7cd780ba367cccbc2593f38d18ce6df89/instposhsshdev")
#
## SFTP Config - Change these.
$Server_Ip = '10.10.9.50'
$Username = 'root'
$Password = 'hunter2'
$Upload_Path = '/some/folder/'
View FTP_upload_on_file_change.ps1
#
# Watches for changes to files matching the $watchFilter within the $watchDir
# directory, then uploads them to a FTP server.
# It is recommended to use a scheduled task to ensure this script runs on
# system boot.
#
## Config - Change these.
$ftpUrl = "ftp://username:password@example.com/some/folder/"
$watchDir = "C:\temp\"
@ravenstar
ravenstar / InterceptorThing.ps1
Created January 25, 2018 11:27
Interceptor - Normal User No Admin Required.
View InterceptorThing.ps1
<#
.SYNOPSIS
This script demonstrates the ability to capture and tamper with Web sessions.
For secure sessions, this is done by dynamically writing certificates to match the requested domain.
This is only proof-of-concept, and should be used cautiously, to demonstrate the effects of such an attack.
Function: Interceptor
Author: Casey Smith, Twitter: @subTee
License: BSD 3-Clause
View keybase.md

Keybase proof

I hereby claim:

  • I am ravenstar on github.
  • I am ravenstar (https://keybase.io/ravenstar) on keybase.
  • I have a public key ASAkREXO_I-2yuhSV2xUXGl9CZ0Xq9qjrdc7dvUorieeCgo

To claim this, I am signing this object:

@ravenstar
ravenstar / auto-restart-nodejs-process
Created July 7, 2016 07:04 — forked from luozhihua/auto-restart-nodejs-process
Auto restart nodejs process when program exit
View auto-restart-nodejs-process
var child_process = require('child_process');
start();
function start(nodefile) {
if (typeof start !== 'string') {
console.log('Has none file. like this: start("app.js")');
}
console.log('Master process is running.');
View coffee_script_tricks.coffee
# These are my notes from the PragProg book on CoffeeScript of things that either
# aren't in the main CS language reference or I didn't pick them up there. I wrote
# them down before I forgot, and put it here for others but mainly as a reference for
# myself.
# assign arguments in constructor to properties of the same name:
class Thingie
constructor: (@name, @url) ->
# is the same as:
@ravenstar
ravenstar / evil.js
Last active August 29, 2015 14:23 — forked from bmeck/evil.js
View evil.js
;(function () {
// random is ... less random
var _random = Math.random.bind(Math);
Math.random = function random() {
return _random() / 1;
}
// setInterval becomes nested setTimeout
var _setTimeout = setTimeout;