Skip to content

Instantly share code, notes, and snippets.

View dansoftware's full-sized avatar

DAN dansoftware

View GitHub Profile
@4piu
4piu / update-dat.ps1
Created January 23, 2022 02:57
Update geoip and geosite dat file for Xray
# remote url
$GEOIP_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/geoip.dat"
$GEOSITE_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/geosite.dat"
# resource path
$GEOIP_PATH="C:\Users\WD-40\AppData\Local\qv2ray\vcore\geoip.dat"
$GEOSITE_PATH="C:\Users\WD-40\AppData\Local\qv2ray\vcore\geosite.dat"
# backup path
$GEOIP_BACKUP=$GEOIP_PATH+".bak"
$GEOSITE_BACKUP=$GEOSITE_PATH+".bak"
@mtrimarchi
mtrimarchi / How_to_enable_Screen_Sharing_on_Macs_via_Terminal.md
Created December 29, 2020 15:19
How to enable Screen Sharing on Macs via Terminal

Follow these steps to enable Screen Sharing via Terminal.

  1. Navigate to Applications | Utilities and launch Terminal. If you're working from a keyboard only, press Command+Space Bar to launch Spotlight, and then enter Terminal in the search box to launch the app.

  2. Enter the following command into Terminal and press Enter to execute it. You will be prompted to provide admin credentials prior to processing the command.

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off -restart -agent -privs -all -allowAccessFor -allUsers

The command above will work most of the time, as it uses the kickstart method of enabling remote management, which in turn enables Screen Sharing as well for all users of the device. This isn't the most secure method and it's not recommended to be used like this for long periods of time due to the potential security risks of unauthorized access, but it should serve you well as a temporary workaround for the pr

@metajiji
metajiji / install-megacli.md
Last active July 2, 2024 06:29 — forked from fxkraus/debian-install-megacli.md
Install LSI MegaCli

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

or

curl -LO https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip
@mistal-distal
mistal-distal / mac_restart_vnc_over_ssh.md
Last active April 29, 2024 02:52
Mac OSX - Restart VNC Server over SSH
@HQJaTu
HQJaTu / ipmi-updater.py
Last active August 9, 2024 15:11
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@fxkraus
fxkraus / debian-install-megacli.md
Last active September 1, 2024 01:55
Install LSI MegaCli .deb package on Debian/Ubuntu

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

unzip

unzip 8-07-14_MegaCLI.zip
@todiadiyatmo
todiadiyatmo / nginx cloudflare
Last active January 21, 2020 22:24
nginx cloudflare
#CloudFlare
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
@mrowe
mrowe / skeleton
Created July 16, 2014 06:55
init.d skeleton
#! /bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@nateware
nateware / gist:3915757
Created October 19, 2012 01:27
Start Mac VNC server from command line
# Step 1: Set priveleges
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
# Step 2: Allow VNC clients
@CrackerJackMack
CrackerJackMack / purge-cloudstack.sh
Created June 22, 2012 12:14
PEW PEW reset cloudstack as a fresh install
/etc/init.d/cloud-management stop
mysql -ppassword -e 'drop database cloud'
mysql -ppassword -e 'drop database cloud_usage'
cloud-setup-databases cloud:password@localhost --deploy-as=root:password
rm -rf /var/log/cloud/management/*
cloud-setup-management
/etc/init.d/cloud-management start