This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Admin email address | |
admin_email=admin@domain.com | |
### Setup the server to mirror | |
mirror=rsync://archive.ubuntu.com/ubuntu | |
### Log file path | |
log=/var/log/ubuntu | |
### Setup the local directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
############################################### | |
### Add this to your ~/.ssh/config # | |
### ControlPath ~/.ssh/master-%r@%h:%p # | |
### ControlMaster no # | |
### Run this as ./persistent_ssh.sh box1 box2 # | |
############################################### | |
MY_PROMPT="$ " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
require 'pry' | |
class Proxy | |
def server(port) | |
puts "Starting Proxy server on port #{port}" | |
@socket = TCPServer.new('localhost', port) | |
loop do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:loop | |
REM Check if the process is already running | |
tasklist /fi "imagename eq %1" | find /i "%1" > nil | |
if errorlevel 1 ( | |
REM If not start the process | |
goto :main | |
) else ( | |
REM Else keep checking every 5 seconds whether it is alive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if $CmdLine[0] >= 1 Then | |
$userInput = $CmdLine[1] | |
Else | |
$userInput = InputBox("GetURL", "Enter the bame of the browser", "firefox", "", "") | |
EndIf | |
if $userInput == "firefox" Then | |
$window = "[CLASS:MozillaWindowClass]" | |
if not winexists($window)=1 then; | |
MsgBox(0, "GetURL", "Mozilla Firefox is not running") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <windows.h> | |
#include <gdiplus.h> | |
#include <time.h> | |
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid) { | |
using namespace Gdiplus; | |
UINT num = 0; | |
UINT size = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies] | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop] | |
"NoChangingWallPaper"=dword:00000001 | |
"NoAddingComponents"=dword:00000001 | |
"NoClosingComponents"=dword:00000001 | |
"NoDeletingComponents"=dword:00000001 | |
"NoEditingComponents"=dword:00000001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] | |
"AutoAdminLogon"="1" | |
"DefaultUserName"="test" | |
"DefaultPassword"="123456" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
display dialog "Name of the browser?" default answer "Safari" | |
set inp to text returned of result | |
tell application "System Events" | |
if inp is "Google Chrome" then | |
tell application "Google Chrome" to return URL of active tab of front window | |
else if inp is "Safari" then | |
tell application "Safari" to return URL of front document | |
else if inp is "Firefox" then | |
tell application "Firefox" to activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set username to do shell script "whoami" | |
set uid to do shell script "id | cut -d' ' -f1 | cut -d'=' -f2 | cut -d'(' -f1" | |
do shell script "/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser " & username with administrator privileges | |
do shell script "/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUserUID " & uid with administrator privileges | |
display dialog "User " & username & " is now the default Auto Login." |
OlderNewer