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 http://www.ubuntugeek.com/ubuntu-tiphowto-reduce-adobe-acrobat-file-size-from-command-line.html | |
$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf |
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
function requestHandler(request, response) { | |
try { | |
if ("color" in request.query) { | |
local ledState = request.query.color.tointeger(); | |
local sleep=10; | |
if ("sleep" in request.query){ | |
sleep = request.query.sleep.tointeger(); | |
} | |
params<-{"color":ledState,"sleepTime":sleep}; |
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
#!/bin/sh | |
IP=`ip -f inet -o address show enp1s0f0 | awk '{print $4}'` | |
echo '{"version": "1.1","host":"'$HOSTNAME'","short_message":"ip","level":4,"_ip":"'$IP'"}' | nc -w 1 -u <server_address> 12201 |
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
IP=`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` | |
MSG=\{\"short_message\":\"heartbeat\",\"host\":\"host\",\"address\":\"$IP\"\} | |
curl -XPOST http://gelf.logging.com/gelf -p0 -d $MSG |
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
#!/bin/bash | |
load=`cat /proc/loadavg | awk '{print $1}'` | |
mem=`free -o | awk 'NR==2{print $3}'` | |
echo '{"version": "1.1","host":"'$HOSTNAME'","short_message":"cpumem","level":4,"_load":'$load',"_mem":'$mem'}' | nc -c -w1 -u graylog.server 12201 | |
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
{ | |
"next":"Samedi 15 Septembre, 11h à Saint-Brès et 15h à Grabels" | |
} |
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
import bpy | |
def enable_gpus(device_type, use_cpus=False): | |
preferences = bpy.context.preferences | |
cycles_preferences = preferences.addons["cycles"].preferences | |
cuda_devices, opencl_devices = cycles_preferences.get_devices() | |
if device_type == "CUDA": | |
devices = cuda_devices | |
elif device_type == "OPENCL": |
OlderNewer