Skip to content

Instantly share code, notes, and snippets.

@Junch
Junch / restart-ssh
Created September 28, 2021 07:18 — forked from influx6/restart-ssh.bash
Restart SSH on Mac Terminal (High Sierra)
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
@mbinna
mbinna / effective_modern_cmake.md
Last active October 28, 2025 09:48
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@jon-a-nygaard
jon-a-nygaard / README-Highcharts-Webpack-Babel.md
Last active October 30, 2020 18:50
A Highcharts example in use with Webpack and Babel.

A Highcharts example in use with Webpack and Babel.

Install

  1. Download source files
  2. Run npm install to install all dependencies.
  3. Run npm run build to bundle app.js into bundle.js

Open application

  1. Open index.html in a browser.
@magnetikonline
magnetikonline / README.md
Last active October 11, 2025 10:28
Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers.

Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers

Tip

Microsoft active directory servers by default provide LDAP connections over unencrypted connections (boo!).

The steps below will create a new self signed certificate appropriate for use with and thus enabling LDAPS for an AD server. Of course the "self-signed" portion of this guide can be swapped out with a real vendor purchased certificate if required.

Steps have been tested successfully with Windows Server 2012R2, but should work with Windows Server 2008 without modification. Requires a working OpenSSL install (ideally Linux/OSX) and (obviously) a Windows Active Directory server.

@sergeyfarin
sergeyfarin / pyqt5_qwebengineview.py
Last active March 6, 2024 07:24
Example of using Python, PyQt5 and QtWebEngineView to open local html file (+js, css). test.html and test.js should be in html subfolder
# coding: utf-8
import sys
import os
# import site
# site.addsitedir('/usr/local/lib/python2.7/site-packages')
from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets
app = QtWidgets.QApplication(sys.argv)
view = QtWebEngineWidgets.QWebEngineView()
@baldurk
baldurk / sourceindex.md
Last active October 20, 2025 11:49
Source indexing for github projects

Symbol Servers

I'm assuming you are familiar with symbol servers - you might not have one set up yourself for your own projects, but you probably use Microsoft's public symbol server for downloading symbols for system DLLs.

For your own projects it might be useful to set up a symbol server - I won't go into how you do that here since it's well documented elsewhere, but basically you just set up a folder somewhere - say X:\symbols\ or \servername\symbols or even http://servername.foo/symbols/ which has a defined tree structure:

symbols/
symbols/mymodule.pdb/
symbols/mymodule.pdb/123456789012345678901234567890122/
@julianxhokaxhiu
julianxhokaxhiu / README.md
Last active April 19, 2022 20:09
How to install OSX 10.11 El Capitan on VMWare

How to install OSX 10.11 El Capitan on VMWare

To accomplish this tutorial you already need a previous copy of OSX installed on VMWare Player or Workstation.

0) Acquire a copy of OSX 10.11 El Capitan

First of all you need to acquire a legal copy of OSX El Capitan from the App Store. This tutorial will not cover this part. Sorry :)

1) Unlock OSX option on VMWare

Download the latest version of VMWare Unlocker and use the relative binary to unlock it ( based on your Host OS ).

@sindresorhus
sindresorhus / compile-objc.sh
Last active February 16, 2025 20:01
Compile Objective-C on the command-line with clang
# -fobjc-arc: enables ARC
# -fmodules: enables modules so you can import with `@import AppKit;`
# -mmacosx-version-min=10.6: support older OS X versions, this might increase the binary size
clang main.m -fobjc-arc -fmodules -mmacosx-version-min=10.6 -o main
@kwhinnery
kwhinnery / app.js
Created May 26, 2014 13:48
HTTP Basic Authentication with Express 4 using the http-auth module
var express = require('express'),
auth = require('http-auth');
// Configure basic auth
var basic = auth.basic({
realm: 'SUPER SECRET STUFF'
}, function(username, password, callback) {
callback(username == 'admin' && password == 'f00lpr00f');
});
@MartinMReed
MartinMReed / openssl_server.c
Last active December 29, 2022 17:19
OpenSSL Server, Reference Example
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <string>
#include <sys/socket.h>
#include <netinet/in.h>
#define IP_ADDR INADDR_ANY