Skip to content

Instantly share code, notes, and snippets.

View salehi's full-sized avatar

SS Salehi salehi

View GitHub Profile
@iandol
iandol / config.json
Last active October 13, 2022 20:06
V2Ray setup, adds HTTP and SOCKS proxy and more logging (see https://www.v2ray.com/en/configuration/index.html). Another option is to use clash to provide a HTTP to SOCKS proxy https://github.com/Dreamacro/clash
{
"log": {
"logelevel": "info"
},
// Run a local SOCKS proxy for apps to connect to.
"inbounds": [{
"port": 1080,
"listen": "127.0.0.1",
"protocol": "socks",
"sniffing": {
@ronsims2
ronsims2 / README.md
Last active October 14, 2023 12:34
A script that will confirm if a specified IPA file was signed with the specified certificate.

Verify an IPA's Signing Certificate

Example :

python ipa_cert_checker.py /Users/janedoe/Documents/Foobar.ipa /Users/janedoe/Documents/barfoo.cer

If any matching certs are found, the script will print something similar to:

Certificate (1) beginning: XCVBNM... matches the specified certificate: /Users/janedoe/Documents/barfoo.cer

@rahul286
rahul286 / linkedin-unfollow.js
Created June 5, 2018 15:17
LinkedIn Unfollow All
# goto https://www.linkedin.com/feed/following/
# in JS console run
var buttons = $("button"),
interval = setInterval(function(){
var btn = $('.is-following');
console.log("Clicking:", btn);
btn.click();
if (buttons.length === 0) {
clearInterval(interval);
@frankyxhl
frankyxhl / zoho_send_email.py
Last active May 14, 2024 21:42
Python script to send email by zoho.com's mail service
# Code from best solution in page below:
# https://help.zoho.com/portal/community/topic/zoho-mail-servers-reject-python-smtp-module-communications
import smtplib
from email.mime.text import MIMEText
from email.header import Header
from email.utils import formataddr
# Define to/from
sender = 'sender@example.com'
@mfalkvidd
mfalkvidd / nginx-thingsboard
Last active June 21, 2024 08:23
Thingsboard nginx reverse proxy with websocket and HTTPS support (Let's Encrypt)
server {
listen 80;
server_name EXTERNAL_THINGSBOARD_DOMAIN.com;
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}
server {
@allebb
allebb / mssqlbackup
Last active May 31, 2024 07:57
Shell script to backup Microsoft SQL Server vNEXT databases on Linux.
#!/usr/bin/env bash
#
# Shell script to automate the backup of Microsoft SQL Server vNEXT backups on Linux.
# Written by Bobby Allen <ballen@bobbyallen.me>, 26/04/2017
#
# Download this script and put into your servers' /usr/bin directory (or symlink) then make it executable (chmod +x)
#
# Usage example (backup databases into /var/backups, keep backups for 5 days, connect to server "localhost" with the account "sa" and a password of "P455w0RD"):
# mssqlbackup "/var/dbbackups" 5 "localhost" "sa" "P455w0rD"
@thomasdarimont
thomasdarimont / RuleLangAceMod.js
Last active January 14, 2022 11:31
PoC for custom Highlighting for the RuleLang of the Graylog Pipeline Plugin
define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
var GraylogRuleLangHighlightRules = function() {
@oinopion
oinopion / read-access.sql
Created October 5, 2016 13:00
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@sandeepraju
sandeepraju / ttfb.sh
Created July 20, 2016 21:17
curl command to check the time to first byte
#!/bin/bash
# file: ttfb.sh
# curl command to check the time to first byte
# ** usage **
# 1. ./ttfb.sh "https://google.com"
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-s \
@mrcrilly
mrcrilly / netdata.yml
Created June 21, 2016 06:34
netdata Ansible Playbook
---
- name: Install netdata on a Linux host
hosts: all
become: true
tasks:
- name: Install depdendencies
yum:
name: "{{item}}"
state: present