Skip to content

Instantly share code, notes, and snippets.

@matthewaveryusa
matthewaveryusa / grab_io_kbm.c
Created May 20, 2016 03:13
linux grab io from keyboard and mouse
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/input.h>
#include <time.h>
#include <stdint.h>
int main(int argc, char* argv[]){
sleep(1);
/* This is an Example for a gallery-item in Elementor Custom CSS with Media Queries for different Elements */
/* Small devices (mobile/tablets, 767px and below) */
@media only screen and (max-width: 766px) {
selector .gallery-item img {
object-fit: cover;
height: 18.5em
}
}
@oxyflour
oxyflour / hindley-milner.ts
Last active May 3, 2024 01:32
a typescript implement of hindley-milner type inference
// a typescript implement of hindley-milner type inference
// reference http://smallshire.org.uk/sufficientlysmall/2010/04/11/a-hindley-milner-type-inference-implementation-in-python/
/// <reference path="./lib.es6.d.ts" />
// ...
interface AstNode {
}
class Id implements AstNode {
@sixlettervariables
sixlettervariables / silly-windows-versions.md
Last active May 3, 2024 01:27
Why "Windows 10" wasn't chosen because of developers checking "Windows 9"

Why "Windows 10" wasn't chosen because of "braindead" developers checking for Windows 95 or 98.

You may have seen the picture, purporting to have source from a Microsoft developer explaining why Windows had to be versioned 10. The punchline is that so many programmers rely on the version to begin with "Windows 9" if they are running on 95 or 98, that Windows 10 was the only logical choice:

if(version.StartsWith("Windows 9"))
{ /* 95 and 98 */
} else {
@Pyrestone
Pyrestone / setup_noetic.md
Created December 23, 2021 11:16
ROS Noetic Install on NVIDIA Jetson Nano (Ubuntu 18.04)

ROS Noetic Install on jetson nano (Ubuntu 18.04)

This guide is derived from the official Noetic setup page, which can be found here: http://wiki.ros.org/noetic/Installation/Source

This version includes some customizations for missing packages on Ubuntu 18.04 which the jetson nano OS uses. I think this installation should work on most ubuntu 18.04 installations, but I can give no guarantees.

System and python dependencies

@adigithub9
adigithub9 / README.md
Created May 3, 2024 01:24 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@leonardofed
leonardofed / README.md
Last active May 3, 2024 01:24
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@Akhil-Suresh
Akhil-Suresh / postman_installation.md
Last active May 3, 2024 01:19
Installing Postman on Ubuntu/Debian

Installing Postman

Step 1

If any version of postman is installed we need to remove it

sudo rm -rf /opt/Postman

Step 2

#include <stdio.h>
#include <stdint.h>
char segoverride[4] = "";
char buffer[100];
#define parse_mod_reg_rnm \
fread(&b, 1, 1, f); \
int mod = (b >> 6) & 0x03; \
int reg = (b >> 3) & 0x07; \
@sxiii
sxiii / remove.sh
Created October 5, 2020 05:35
Docker Swarm - Remove all Down nodes automatically
#!/bin/bash
# Requirements: linux, docker, grep, awk
# This script removes all "Down" (off) nodes from Docker Swarm
# Useful to clean stuff from time to time, if you have auto-joining nodes for example
sudo docker node rm $(sudo docker node ls | grep Down | awk -F" " '{ print $1 }')