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
[alias] | |
lg = lg1 | |
lg1 = lg1-specific --all | |
lg2 = lg2-specific --all | |
lg3 = lg3-specific --all | |
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' | |
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' | |
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' |
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
# ninovsnino's PowerShell's $Profile | |
# http://ninovsnino.io/posts/prettyfy-powershell/ | |
Import-Module posh-git | |
Import-Module oh-my-posh | |
Import-Module Get-ChildItemColor | |
Set-Theme Paradox | |
Set-Alias -Name npp -Value 'C:\Program Files\Notepad++\notepad++.exe' -Description "Alias to Notepad++" | |
Set-Alias -Name ll -Value Get-ChildItemColorFormatWide -Description "Alias ll to ColorFormatWide" |
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
#include "stdio.h" | |
#define ID_A 0x01 | |
#define ID_B 0x02 | |
int main() { | |
unsigned char type; | |
unsigned short result; | |
printf("size of unsigned char = %x\n", sizeof(unsigned char) ); |
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
#include <stdio.h> | |
int main( void ) | |
{ | |
int i; | |
for ( i = 1; i <= 100; i++ ) | |
{ | |
if ( !(i % 3) ) | |
{ |
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
#include <stdio.h> | |
#include <ncurses.h> | |
int main( void ) | |
{ | |
printf( "Hello Ncurses!\r\n" ); | |
getch( ); | |
return ( 0 ); | |
} |
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
cmake_minimum_required(VERSION 2.8.9) | |
project (test_ncurses) | |
find_package(curses REQUIRED) | |
include_directories(${CURSES_INCLUDE_DIR}) | |
file(GLOB SOURCES "*.c") | |
add_executable(test_ncurses ${SOURCES}) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#include <termios.h> | |
#include <stdio.h> | |
static struct termios old, new; | |
/* Initialize new terminal i/o settings */ | |
void initTermios(int echo) | |
{ | |
tcgetattr(0, &old); /* grab old terminal i/o settings */ | |
new = old; /* make new settings same as old settings */ |
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
" Load matchit.vim, but only if the user hasn't installed a newer version. | |
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# '' | |
runtime! macros/matchit.vim | |
endif | |
let g:fuf_file_exclude = '\v\~$' | |
\ . '|\.(o|png|PNG|JPG|class|CLASS|jpg|exe|dll|bak|swp|pyc|pyo)$' | |
\ . '|(^|[/\\])\.(hg|git|bzr)($|[/\\])' | |
\ . '|(^|[/\\])venv[/\\]' |
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
from OpenSSL import crypto | |
from socket import gethostname | |
k = crypto.PKey() | |
k.generate_key(crypto.TYPE_RSA, 2048) # generate RSA key-pair | |
cert = crypto.X509() | |
cert.get_subject().C = "<country>" | |
cert.get_subject().ST = "<city>" |
NewerOlder