Skip to content

Instantly share code, notes, and snippets.

View krayfaus's full-sized avatar
🌼
Overthinking modular design

Krayfaus krayfaus

🌼
Overthinking modular design
View GitHub Profile
@endel
endel / aws-ec2-root-node-port-80.sh
Created December 4, 2019 18:58
Allow non-root node to use ports 80 (HTTP) and 443 (HTTPS) (AWS EC2)
# Allow non-root node to use ports 80 (HTTP) and 443 (HTTPS)
sudo setcap 'cap_net_bind_service=+ep' $(which node)
@OALabs
OALabs / dll_exports.py
Created December 1, 2019 05:12
Build dictionary of DLL exports (Windows API Names)
import os
import pefile
import json
INTERESTING_DLLS = [
'kernel32.dll', 'comctl32.dll', 'advapi32.dll', 'comdlg32.dll',
'gdi32.dll', 'msvcrt.dll', 'netapi32.dll', 'ntdll.dll',
'ntoskrnl.exe', 'oleaut32.dll', 'psapi.dll', 'shell32.dll',
'shlwapi.dll', 'srsvc.dll', 'urlmon.dll', 'user32.dll',

Best / our practise on writing styled components

📖 Documentation

👮🏻 Conventions

Know your components. Look at existing components before you create a brand new one. It is really fun to create new components but please ask yourself or the designer if we already have a component that might do the job first! Maybe you can create a variant of an existing component or just use it out of the box? It is important to evaluate the complexity of creating a variant. Sometimes it is smarter to create a new component. Discuss with your teammates!

DRY - Don't repeat yourself - Use inheritance to share style between similar components.

@antxd
antxd / index.html
Created June 28, 2019 16:01
Maintenance Page
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="robots" content="noindex"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
@kotarella1110
kotarella1110 / Bad.jsx
Last active April 27, 2021 16:49
Best way to define styled-components
import React from 'react';
import styled from 'styled-components';
const Title = styled.h1`
font-size: 1.5em;
text-align: center;
color: palevioletred;
`;
const Wrapper = styled.section`
@SocraticBliss
SocraticBliss / ps4_mono_to_il.py
Last active September 14, 2023 00:40
PS4 MONO binaries to IL MONO binaries
#!/usr/bin/env python
'''
PS4 MONO binaries to IL MONO binaries by SocraticBliss (R)
The script recursively searches the directories for PS4 MONO DLL and EXE files,
finds the scekrit magic for them and then spits them out in the same directory...
1) Place this script in the top-most directory
2) python ps4_mono_to_il.py
@nathanverrilli
nathanverrilli / InstallConsoleFont.ps1
Last active January 26, 2024 15:43
Add a font to the list of permissible console fonts for windows powershell terminal // painlessly edit the relevant registry key
param (
[string]$FontName,
[string]$FontFile,
[switch]$Help
);
function isAdminMode() {
return ([Security.Principal.WindowsPrincipal] `
[Security.Principal.WindowsIdentity]::GetCurrent() `
@andrewrk
andrewrk / microsoft_craziness.h
Created September 1, 2018 14:35
jonathan blow's c++ code for finding msvc
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
@TomFaulkner
TomFaulkner / ubuntu18.04-vfio.md
Last active February 3, 2024 15:28
VFIO Setup on Ubuntu 18.04
@ddevault
ddevault / Makefile
Last active February 20, 2024 14:17
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h