Skip to content

Instantly share code, notes, and snippets.

View koldev's full-sized avatar

Laszlo Kocsis koldev

View GitHub Profile
@mlhaufe
mlhaufe / parameters.vbs
Created June 19, 2011 12:52
VBScript class constructor parameters
Class Person
Private m_Age
Private m_Name
Public Default Function Init(Name, Age)
m_Name = Name
m_Age = Age
Set Init = Me
End Function
@Mikulas
Mikulas / gist:2551307
Created April 29, 2012 15:31
Jerry Coffin's ReadProcessMemory virtual query example
#include <iostream>
#include <vector>
#include <string>
#include <windows.h>
#include <algorithm>
#include <iterator>
template <class InIter1, class InIter2, class OutIter>
void find_all(unsigned char *base, InIter1 buf_start, InIter1 buf_end, InIter2 pat_start, InIter2 pat_end, OutIter res) {
for (InIter1 pos = buf_start;
@willurd
willurd / web-servers.md
Last active May 21, 2024 09:23
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@timbergus
timbergus / index.html
Last active March 9, 2023 16:27
Basic HTML5 "Hello World!" document structure.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello World! Site Title</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
@17twenty
17twenty / readme.md
Created September 6, 2015 21:00
Using systemd-networkd

For those of you who want to try out systemd-networkd, you can read on, and find out in this tutorial how to switch from NetworkManager to systemd-networkd on Linux.

Requirement systemd-networkd is available in systemd version 210 and higher. Check the version of your systemd before proceeding.

$ systemctl --version

Switch from Network Manager to Systemd-Networkd

It is relatively straightforward to switch from Network Manager to systemd-networkd (and vice versa).

@bkaradzic
bkaradzic / orthodoxc++.md
Last active May 21, 2024 15:40
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++?

@jahe
jahe / spring-boot-cheatsheet.java
Last active May 16, 2024 07:44
Spring Boot Cheatsheet
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active May 14, 2024 00:59 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@chrisveness
chrisveness / crypto-aes-gcm.js
Last active May 6, 2024 19:16
Uses the SubtleCrypto interface of the Web Cryptography API to encrypt and decrypt text using AES-GCM (AES Galois counter mode).
/**
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt().
* (c) Chris Veness MIT Licence
*
* @param {String} plaintext - Plaintext to be encrypted.
* @param {String} password - Password to use to encrypt plaintext.
* @returns {String} Encrypted ciphertext.
*
* @example
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw');
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 20, 2024 22:17
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux