See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
#include <getopt.h> | |
#include <regex.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
void showHelp(char *biname) { | |
printf("%s [-l length] [-f 'regex'] [-n]\n", biname); | |
printf(" -l, --length\n"); | |
printf(" Password length\n"); |
#define DEFER_MERGE(a,b) a##b | |
#define DEFER_VARNAME(a) DEFER_MERGE(defer_scopevar_, a) | |
#define DEFER_FUNCNAME(a) DEFER_MERGE(defer_scopefunc_, a) | |
#define DEFER(BLOCK) void DEFER_FUNCNAME(__LINE__)(int *a) BLOCK; __attribute__((cleanup(DEFER_FUNCNAME(__LINE__)))) int DEFER_VARNAME(__LINE__) | |
// Usage: | |
/* | |
void dosomething() | |
{ | |
char* data = malloc(100); |
/********************************************* | |
* 円周率計算 by Euler の公式 | |
*********************************************/ | |
#include <iostream> // for cout | |
#include <math.h> // for pow() | |
#include <stdio.h> // for printf() | |
#include <time.h> // for clock() | |
#define FNAME "pi_euler.txt" | |
using namespace std; |
Node* deleteNode(Node* head, int val) { | |
if (head != NULL) { | |
Node* curr = head; | |
Node* prev = nullptr; | |
while(curr->val != val) { | |
prev = curr; | |
if (curr->next != nullptr) curr=curr->next; | |
else return nullptr; | |
} | |
if (prev != nullptr) prev->next = curr->next; |
This gist will help you to compile ffmpeg
with NVENC, QSV, VAAPI, VDPAU, and OpenCL support.
nVidia
nvresize
patch is outdated and not more compatible to the latest version of FFmpeg, so it's not included in this documentation.
(even if I've passed a lot of time at trying to make it compile... without any success)
Please don't rely on this page: https://developer.nvidia.com/ffmpeg, the implementation is a hack and was never been added to the main FFmpeg tree.
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
#!/usr/bin/env bash | |
# | |
# Author: Stefan Buck | |
# License: MIT | |
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
# | |
# | |
# This script accepts the following parameters: | |
# | |
# * owner |
The MIT License (MIT) | |
Copyright (c) 2016 Luca Corbatto | |
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 the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |