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
// | |
// main.m | |
// EndpointSecurityDemo | |
// | |
// Created by Omar Ikram on 17/06/2019 - macOS Catalina 10.15 Beta 1 (19A471t) | |
// Updated by Omar Ikram on 15/08/2019 - macOS Catalina 10.15 Beta 5 (19A526h) | |
// Updated by Omar Ikram on 01/12/2019 - macOS Catalina 10.15 (19A583) | |
// Updated by Omar Ikram on 31/01/2021 - macOS Big Sur 11.1 (20C69) | |
// Updated by Omar Ikram on 07/05/2021 - macOS Big Sur 11.3.1 (20E241) | |
// Updated by Omar Ikram on 04/07/2021 - macOS Monterey 12 Beta 2 (21A5268h) |
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
FROM ubuntu:latest | |
RUN apt update && apt install openssh-server sudo -y | |
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000 test | |
RUN echo 'test:test' | chpasswd | |
RUN service ssh start |
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
# Root shell | |
echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list | |
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/Release.key | sudo apt-key add - | |
apt update | |
apt install podman -y |
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 "Getting DNS nameservers" | |
$ns = Get-DnsClientServerAddress -AddressFamily IPv4 | Select-Object -ExpandProperty ServerAddresses | %{ "nameserver " + $_;} | |
echo "Getting search domains" | |
$sd = Get-DnsClientGlobalSetting | Select-Object -ExpandProperty SuffixSearchList | %{ "search " + $_;} | |
echo "-----------------------" | |
echo $ns | |
echo $sd |
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
#!/usr/bin/env python3 | |
import sys | |
import os | |
# 1. Run `xrandr -q | grep connected` to identify what the correct display IDs are | |
# 2. set keyboard shortcuts like <ctrl>+<super>+<alt>+1 to call /home/username/set_display.py desktop | |
if len(sys.argv) <= 1: | |
sys.argv.append("all") | |
if sys.argv[1].strip() == "laptop": |
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
# Python Port of https://gist.github.com/richinseattle/1cafd9368890ecf3d8e1dbbc18f2fe38 | |
from ctypes import HRESULT, windll, POINTER, byref | |
from ctypes.wintypes import HANDLE, LPCWSTR, UINT, LPCSTR | |
from enum import IntEnum | |
from comtypes.hresult import S_OK | |
class AMSI_RESULT(IntEnum): | |
AMSI_RESULT_CLEAN = 0, | |
AMSI_RESULT_NOT_DETECTED = 1 |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks |
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 <moderngpu/transform.hxx> | |
using namespace mgpu; | |
int main(int argc, char** argv) { | |
// The context encapsulates things like an allocator and a stream. | |
// By default it prints device info to the console. | |
standard_context_t context; | |
// Launch five threads to greet us. |
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
from datetime import datetime | |
import librarbbitmq | |
msg = 'x'*20000 | |
M_PROP = {'delivery_mode': 1} | |
connection = librabbitmq.connecetion(...) | |
channel = connection.channel() | |
start = datetime.now() | |
for _ in xrange(count): | |
connection._basic_publish(1, msg, X, RK, M_PROP, False, False) |