Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@flaviotorres
flaviotorres / supermicro_redfish
Created January 23, 2019 01:49
Supermicro redfish power on off
SERVER="my-server"
USER="ADMIN"
PASS="ADMIN"
# ON
curl -si -u $USER:$PASS -k -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"Action": "Reset", "ResetType": "On"}' https://$SERVER/redfish/v1/Systems/1/Actions/ComputerSystem.Reset
#OFF
curl -si -u $USER:$PASS -k -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"Action": "Reset", "ResetType": "ForceOff"}' https://$SERVER/redfish/v1/Systems/1/Actions/ComputerSystem.Reset
@amitxv
amitxv / XHCI-IMOD-Interval.ps1
Last active April 23, 2024 14:04
Configure the IMOD Interval for XHCI controllers with RWEverything
param(
[switch]$verbose
)
# The variables starting with $GLOBAL store values that should be applied to all XHCI controllers by default.
# To override this default value on a per-controller basis, specify the DEV_XXXX hardware ID value for the XHCI controller along with its data
# See the example below.
#
# $globalInterval = 0x0
# $globalHCSPARAMSOffset = 0x4
if (window.location.origin !== "https://www.instagram.com") {
window.alert(
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.",
);
window.location.href = "https://www.instagram.com";
console.clear();
}
const fetchOptions = {
credentials: "include",
@inakiarroyo
inakiarroyo / multiple_ssh_setting.md
Last active April 23, 2024 14:01
Working with multiples SSH keys

Working with multiple SSH keys

Step 1. Ensure you have an SSH client installed

ssh -V
ls -a ~/.ssh 

Step 2. Set up your identity

You can create a default identity

$ ssh-keygen 
@bentman
bentman / Add-DevToMyWinServer.ps1
Last active April 23, 2024 14:01
Script to install Dev Tools on Windows Server 2022
<#
.SYNOPSIS
Script to install Dev Tools on Windows Server (tested on 2022)
.DESCRIPTION
Installs the following from multiple resources:
Microsoft.VCLibs v14.00 (github)
Microsoft.UI v2.7.3 (github)
winget-cli v1.6.2771 (github)
Microsoft pwsh.exe vCurrent (winget)
Microsoft.WindowsTerminal v1.18.2822.0 (github)
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active April 23, 2024 14:00
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@nir9
nir9 / server.c
Created December 20, 2023 18:38
Minimalist HTTPS Web Server in C - not for production use, only for fun :)
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <openssl/ssl.h>
#include <stdio.h>
#include <string.h>
void main() {
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
@bkaradzic
bkaradzic / orthodoxc++.md
Last active April 23, 2024 13:59
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 23, 2024 13:59
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@jhrcook
jhrcook / common-github-badges.md
Last active April 23, 2024 13:58
A list of GitHub badges I usually add to me README files.

GitHub Badges

Social

jhc github jhc twitter jhc website

Code