Skip to content

Instantly share code, notes, and snippets.

View ikem-krueger's full-sized avatar

Ikem Krueger ikem-krueger

View GitHub Profile
@hpaul-osi
hpaul-osi / DisablingServicesOnServer2016wDE.ps1
Created June 11, 2017 01:41
Disable unnecessary services that on Windows Server 2016 Desktop Experience (based on MS Security Blog recommendations)
# Disable extraneous services on Server 2016 Desktop Experience
# https://blogs.technet.microsoft.com/secguide/2017/05/29/guidance-on-disabling-system-services-on-windows-server-2016-with-desktop-experience/
Configuration DisablingServicesOnServer2016wDE
{
param(
[String]$ComputerName = "localhost",
[ValidateSet('ShouldBeDisabledOnly','ShouldBeDisabledAndDefaultOnly','OKToDisable','OKToDisablePrinter','OKToDisableDC')]
[String]$Level = 'OKToDisable'
)
@jeje
jeje / gist:3027236
Created July 1, 2012 06:58
Arduino Sketch recording raw IR signal and sending it through an infrared LED again every 2 seconds
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
boolean recording = true;
decode_results results;
@kylemanna
kylemanna / connmanctl.md
Last active June 27, 2023 23:12
Connmanctl Cheat Sheet
@rolfn
rolfn / Rclone.md
Last active October 7, 2023 19:40
Zugriff auf Online-Speicher per »Rclone«

Zugriff auf Online-Speicher per »Rclone«

Das Programm »Rclone« ist geeignet, auf eine Vielzahl von Online-Speicher (»Dropbox«, »Onedrive«, diverse WebDav-Zugänge u.v.a.) zuzugreifen. Gelingt es, diese Online-Speicher beim Einloggen in einen Linux-Rechner automatisch zu mounten, ergeben sich viele bequeme Möglichkeiten, eigene Dateien zu sichern oder auf sie von anderen Orten aus zuzugreifen. Man kann den gesamten Online-Speicher oder Teile davon von »Rclone« verschlüsseln lassen, womit man auch sensible Daten auf wenig verlässlichen Speicherorten unterbringen kann. Hervorzuheben ist, dass die Dokumentation von »Rclone« außergewöhnlich gut verständlich geschrieben ist. Auch kann man die Konfiguration sehr einfach durchführen.

Im Folgenden wird beschrieben, wie man den Zugriff auf ausgewählte Online-Speicher einrichtet. Es wird dabei von Möglichkeiten des Linux-Dienstes »systemd« Gebrauch gemacht. »Rclone« ist unter »openSUSE« im Standard-Repositorium enthalten. Für andere Linux-Dist

@macx
macx / PHP mit Visual Studio Code.md
Last active November 9, 2023 14:45
PHP Server mit Visual Studio Code
@neslekkim
neslekkim / monitorissues
Last active November 14, 2023 21:16
When all Windows are resized after your monitor have been power-recycled
Some monitors (especially hdmi/TV monitors) don't keep the hdmi port "alive" when they are powered down.
As a result, when windows reboots or comes out of sleep, it can't detect a monitor, so it sets resolution to it's "SIMULATED" monitor registry entry in the key at;
HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration
This can be manually edited to contain the actual screen registration of your default monitor.
Change these keys:
Under each is a tree called "00" two of the keys are
PrimSurfSize.cx
@sv99
sv99 / How can I replace a newline (\n) using sed.md
Last active December 5, 2023 13:43
How can I replace a newline (\n) using sed?

stackoverflow (hdorio)

Fast answer:

sed ':a;N;$!ba;s/\n/ /g' file
  1. :a create a label 'a'
  2. N append the next line to the pattern space
  3. $! if not the last line, ba branch (go to) label 'a'
  4. s substitute, /\n/ regex for new line, / / by a space, /g global match (as many times as it can)
@ninjascribble
ninjascribble / node-user-agent.js
Last active December 22, 2023 02:42
Fetching the user-agent string from a request using either NodeJS or NodeJS + Express
/** Native NodeJS */
var http = require('http')
, server = http.createServer(function(req) {
console.log(req.headers['user-agent']);
});
server.listen(3000, 'localhost');
/** NodeJS with Express */
var express = require('express')
@cunneen
cunneen / Readme.md
Last active January 23, 2024 11:17
Install Open GApps In Android Emulator

Introduction

This works to install Open GApps into the Android Emulator, working around the issue where the system partition is too small.

With it, I can get Google Play installing into the emulator. Tested on KitKat (API 19), Lollipop (API 21) and Oreo (API 27).

It's tested on MacOS.

Instructions

@muktupavels
muktupavels / toggle-decorations.c
Last active January 28, 2024 12:59
Simple app to toggle window decorations.
/*
* Copyright (C) 2017 Alberts Muktupāvels
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of