This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table inet filter { | |
chain inbound { | |
type filter hook input priority 0 | |
policy drop | |
ct state invalid counter drop | |
ct state { established, related } counter accept | |
ip protocol icmp counter accept | |
ip6 nexthdr ipv6-icmp counter accept |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o xtrace -o errexit -o pipefail -o nounset | |
######################################################################################## | |
# CircleCI's current recommendation for roughly serializing a subset | |
# of build commands for a given branch | |
# | |
# circle discussion thread - https://discuss.circleci.com/t/serializing-deployments/153 | |
# Code from - https://github.com/bellkev/circle-lock-test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -o drmgl Linux_DRM_OpenGLES.c `pkg-config --cflags --libs libdrm` -lgbm -lEGL -lGLESv2 | |
/* | |
* Copyright (c) 2012 Arvin Schnell <[email protected]> | |
* Copyright (c) 2012 Rob Clark <[email protected]> | |
* Copyright (c) 2017 Miouyouyou <Myy> <[email protected]> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a | |
* copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static BOOL isKeyFrame(CMSampleBufferRef sample) | |
{ | |
auto a = CMSampleBufferGetSampleAttachmentsArray(sample, 0); | |
if (CFArrayGetCount(a) > 0) { | |
CFBooleanRef value; | |
auto b = CFDictionaryGetValueIfPresent | |
((CFDictionaryRef) CFArrayGetValueAtIndex(a, 0) | |
, kCMSampleAttachmentKey_NotSync | |
, reinterpret_cast<const void **>(&value)) | |
; |