Skip to content

Instantly share code, notes, and snippets.

View Gnnng's full-sized avatar
🎯
Focusing

Deli Gong Gnnng

🎯
Focusing
View GitHub Profile
@EncryptedCurse
EncryptedCurse / osmcCodecPatch.sh
Last active October 10, 2022 03:10
Raspberry Pi MPEG-2, VC-1 license patch
sudo su <<EOF
cd /boot
cp start_x.elf start_x.elf_backup && \
perl -pne 's/\x47\xE9362H\x1D\x18/\x47\xE9362H\x1D\x1F/g' < start_x.elf_backup > start_x.elf
EOF
@mbinna
mbinna / effective_modern_cmake.md
Last active November 13, 2024 23:24
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

@StevenACoffman
StevenACoffman / Docker Best Practices.md
Last active November 9, 2024 17:19
Docker Best Practices

Mistakes to Avoid: Docker Antipatterns

Whichever route you take to implementing containers, you’ll want to steer clear of common pitfalls that can undermine the efficiency of your Docker stack.

Don’t run too many processes inside a single container

The beauty of containers—and an advantage of containers over virtual machines—is that it is easy to make multiple containers interact with one another in order to compose a complete application. There is no need to run a full application inside a single container. Instead, break your application down as much as possible into discrete services, and distribute services across multiple containers. This maximizes flexibility and reliability.

Don’t install operating systems inside Docker containers

It is possible to install a complete Linux operating system inside a container. In most cases, however, this is not necessary. If your goal is to host just a single application or part of an application in the container, you need to install only the essential

@so0k
so0k / kubectl.md
Last active September 11, 2024 08:36
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@mgoodness
mgoodness / k8s-svc-annotations.md
Last active September 7, 2024 16:25
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
@chenyanzhe
chenyanzhe / style.css
Last active March 23, 2018 22:53
马克飞象自定义渲染CSS
body {
font-family: "Avenir Next", Helvetica, Arial, sans-serif;
padding:1em;
margin:auto;
max-width:42em;
background:#fefefe;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
@tomysmile
tomysmile / setup-vagrant-macosx.md
Created April 26, 2016 05:54
How to Install Virtualbox and Vagrant on MacOSX

Install Virtualbox && Vagrant for MacOSX

Vagrant uses Virtualbox to manage the virtual dependencies. You can directly download virtualbox and install or use homebrew for it.

$ brew cask install virtualbox

Now install Vagrant either from the website or use homebrew for installing it.

@BretFisher
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@stevenocchipinti
stevenocchipinti / remote.xml
Created April 4, 2015 11:37
Kodi remote debugging keymap
<!--
kindly provided by 'Knapster'
Ref: http://forum.kodi.tv/showthread.php?tid=139145&pid=1285390#pid1285390
-->
<keymap>
<global>
<remote>
<channelplus>Notification(Keypress, channelplus, 1)</channelplus>
<channelminus>Notification(Keypress, channelminus, 1)</channelminus>
@robvanoostenrijk
robvanoostenrijk / Instructions.md
Last active October 29, 2024 16:44
Install Mac OS X 10.6 SDK on newer Xcode