Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
This file contains 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/expect -- | |
## | |
## patched to accomplish fortinet from nlogin | |
## in turn patched to accomplish D-Link from fnlogin | |
## by: Daniel G. Epstein <dan at rootlike.com> | |
## adapted by: Diego Ercolani <diego.ercolani at ssis.sm> | |
## further adapted by: Gavin McCullagh <gavin.mccullagh at gcd.ie> | |
## | |
## rancid 2.3.6 | |
## Copyright (c) 1997-2009 by Terrapin Communications, Inc. |
This file contains 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
/* See http://blog.regehr.org/archives/1063 | |
*/ | |
#include <type_traits> | |
#include <cstdint> | |
#include <limits> | |
#include <typeinfo> | |
#ifndef ARGTYPE | |
#define ARGTYPE uint32_t | |
#endif /* ARGTYPE */ |
This file contains 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 __future__ import print_function | |
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group | |
# (Any use permitted, subject to terms of PostgreSQL license; see.) | |
# If we have a 64-bit integer type, then a 64-bit CRC looks just like the | |
# usual sort of implementation. (See Ross Williams' excellent introduction | |
# A PAINLESS GUIDE TO CRC ERROR DETECTION ALGORITHMS, available from | |
# ftp://ftp.rocksoft.com/papers/crc_v3.txt or several other net sites.) |
This file contains 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
#!/bin/bash | |
file="$1" | |
colorpages=0 | |
# count all pages | |
totalpages=$(gs -q -dNODISPLAY -c "($1) (r) file runpdfbegin pdfpagecount = quit") | |
echo "Total pages : $totalpages" | |
# find pages with colors | |
for page in $(identify -density 12 -format '%p ' "$file") ; do |
This file contains 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 <vector> | |
#include <random> | |
#include <cstddef> | |
#include <functional> | |
#include <unordered_set> | |
template <typename T, typename H = std::hash<T> > | |
struct Hasher | |
{ | |
std::size_t operator()(const T* const pt) const |
Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.
Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache
as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.
Check the gist's comments for any further tips and instructions, especially if you are running into problems!
Results after following the guide as of 11.01.2017 13:08:
This file contains 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 zsh | |
TO=root@localhost #EMAIL address of the recipient | |
HOST=127.0.0.1 #HOSTNAME with SSMTP service | |
main() | |
{ | |
START=$(date +%s) | |
STARTT="$(date)" | |
OUT="$(mktemp mm.XXXXXXXXXX)" | |
echo "##[mm]: launched in folder $(pwd) with pid $$" > $OUT | |
echo "##[mm] received output:" >> $OUT |
This file contains 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
#!/bin/env zsh | |
TASKS="${TASKS:=100}" | |
CONCURRENCY="${CONCURRENCY:=8}" | |
main() | |
{ | |
for t in `seq $TASKS` | |
do | |
$@ $t & | |
while [ $(ps --no-headers -o pid --ppid=$$ | wc -w) -gt $CONCURRENCY ] | |
do |
This file contains 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 zsh | |
main() | |
{ | |
START=$(date +%s) | |
STARTT="$(date)" | |
OUT="$(mktemp nm.XXXXXXXXXX)" | |
echo "the launchpath was $(pwd) with pid $$" > $OUT | |
echo "the received output is:" >> $OUT | |
if [ "$1" = "-" ] | |
then |
OlderNewer