Meta
This is @LucasWerkmeistr's #systemdTOTD thread, gathered using Spooler and reposted here with only some typographic adjustments by me.
Part 1
Alright everyone, how about some systemd Tip Of The Day goodness?
#!/bin/bash | |
CONF=/etc/profile.d/optruby.sh | |
INSTALLED=/opt/ruby | |
do_status() { | |
current=$(OPTRUBY=system ; [ -f $CONF ] && . $CONF ; echo $OPTRUBY ) | |
echo "Currently enabled version via profile.d: $current" | |
echo "Currently selected by this shell: $(ruby -v)" | |
} |
#include <iostream> | |
using namespace std; | |
/* | |
template<typename T, typename std::enable_if<std::is_enum<T>::value>::type* = nullptr> | |
static inline bool set_in(T val, T a1, T a2) { return (val==a1||val==a2); } | |
template<typename T, typename std::enable_if<std::is_enum<T>::value>::type* = nullptr> | |
static inline bool set_in(T val, T a1, T a2, T a3) { return (val==a1||val==a2||val==a3); } | |
template<typename T, typename std::enable_if<std::is_enum<T>::value>::type* = nullptr> | |
static inline bool set_in(T val, T a1, T a2, T a3, T a4) { return (val==a1||val==a2||val==a3||val==a4); } |
This is @LucasWerkmeistr's #systemdTOTD thread, gathered using Spooler and reposted here with only some typographic adjustments by me.
Alright everyone, how about some systemd Tip Of The Day goodness?
@-moz-document domain(youtube.com) { | |
body { | |
overflow-x: hidden; | |
} | |
#masthead-positioner { | |
z-index: 10; | |
} | |
.watch-stage-mode #player .player-api { |
#!/bin/bash | |
{ | |
NPROCS=4 | |
NICE=10 | |
STDOUT=/dev/stdout | |
print_usage() | |
{ | |
cat <<END |
units metal | |
dimension 3 | |
boundary p p p | |
atom_style atomic | |
timestep 0.001 | |
variable min2th index 20 | |
variable max2th index 90 | |
lattice bcc 3.147 |
Cmin(1,1,1) = 1 | |
repuls(1,1) = 0.4770183040558415 | |
nn2(1,1)=1 | |
rc = 5.0 | |
ialloy=1 | |
augt1=0 | |
delr=1 | |
emb_lin_neg=1 | |
bkgd_dyn=1 |
@echo off | |
setlocal | |
echo ************************************************ | |
echo **** Martok's Syncrotron **** | |
echo ************************************************ | |
echo **** 1: Copy from this machine to exHDD **** | |
echo **** 2: Copy from exHDD to this machine **** | |
echo **** anything else: exit **** | |
echo ************************************************ | |
set /p select="Choose option: " |
<?php | |
define('IND',' '); | |
function hex2bin( $str ) { | |
$sbin = ""; | |
$len = strlen( $str ); | |
for ( $i = 0; $i < $len; $i += 2 ) { | |
$sbin .= pack( "H*", substr( $str, $i, 2 ) ); | |
} |
from pymclevel import items | |
def itembyname(name): | |
if name in items.items.items: | |
return items.items.itewms[name]["id"] | |
return 0 | |
def namebyitem(id): | |
item = items.items.findItemID(id) | |
if type(item["name"]) == str or type(item["name"]) == unicode: |