Skip to content

Instantly share code, notes, and snippets.

View Albus's full-sized avatar
🏠
Working from home

Anton Rastyazhenko Albus

🏠
Working from home
View GitHub Profile
#!/usr/bin/env bash
debpacket=$1
dotfilename=$(pwd)/${debpacket}.pdf
exec $(which debtree) ${debpacket} --no-provides --no-recommends --no-versions --no-conflicts --rotate --condense | dot -Tpdf > ${dotfilename}
xdg-open ${dotfilename}
#!/bin/sh
#
# This script purges all the packages that have a status different from ii
# 2005 - Julien Valroff <[email protected]>
#
# Changelog:
# 0.01 (16/06/2005)
# * Initial release
# 0.02 (16/10/2005)
# * Fixed possible symlink attacks (uses mktemp)
@echo off
for /f "usebackq delims=" %%i in (^
`@"%SystemRoot%\system32\mshta.exe"
"javascript:try{new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write(window.screen.width+'x'+window.screen.height)};catch(e){};close();"
^|more`
) do echo %%i
Функция Получить_COMОбъект(Путь="")
Скрипт=СоздатьОбъект("MSScriptControl.ScriptControl");
Скрипт.language="javascript";
Возврат Скрипт.Eval("GetObject('"+Путь+"')");
КонецФункции
//*******************************************
Процедура Сформировать()
Пользователь="*************";
Пароль="*************";
ДСО=Получить_COMОбъект("LDAP:");
[+HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\AFD\Parameters]
"EnableDynamicBacklog"=dword:00000001
"MinimumDynamicBacklog"=dword:00000014
"MaximumDynamicBacklog"=dword:00004e20
"DynamicBacklogGrowthDelta"=dword:0000000a
[+HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters]
"ForwardBroadcasts"=dword:00000000
"IPEnableRouter"=dword:00000000
"UseDomainNameDevolution"=dword:00000000
@Albus
Albus / inst-sublime.sh
Created June 19, 2016 20:00
Ubuntu install Sublime-Text
#!/bin/sh -e
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer -V
sudo gpg --keyserver keyserver.ubuntu.com --recv 1397BC53640DB551
sudo gpg --export --armor 1397BC53640DB551 | sudo apt-key add -
sudo apt-get update
#Generated Form Function
function GenerateForm {
########################################################################
# Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.10.0
# Generated On: 2014-02-17 09:30
# Generated By: Jean-Sebastien Elie
Import-Module ActiveDirectory
########################################################################
#region Import the Assemblies
$ConnectionBroker = "srv-ts-04.fc-moron.ru"
$AllSessions = Get-RDUserSession -ConnectionBroker $ConnectionBroker
if($AllSessions -eq $null){
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
$Title = "Просмотр терминальных сессий"
$Message = "Не найдено ни одной сессии"
$Buttons = [System.Windows.Forms.MessageBoxButtons]::OK
$Icon = [System.Windows.Forms.MessageBoxIcon]::Exclamation
[System.Windows.Forms.MessageBox]::Show($Message,$Title,$Buttons,$Icon)
dpkg -l |tail -n+6 |awk '{print($2)}'| tr '\n' ' '