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 python3 | |
# Author: Edoardo Paolo Scalafiotti <edoardo849@gmail.com> | |
# https://hackernoon.com/how-to-control-a-fan-to-cool-the-cpu-of-your-raspberrypi-3313b6e7f92c | |
import os | |
from time import sleep | |
import signal | |
import sys | |
import RPi.GPIO as GPIO | |
pin = 18 # The pin ID, edit here to change it | |
maxTMP = 46 # The maximum temperature in Celsius after which we trigger the fan |
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/perl | |
=pod | |
I have GNU libtool installed so the answer from link below not simply work: | |
http://stackoverflow.com/a/30970680/3368344 | |
The `ar` command like `ar r ../libcrypto.a cryptlib.o mem.o ...` | |
This script remove `r` from arguments, and call osx libtool to merge o files to a file. |
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/perl | |
# 从lrprev里截取图片 | |
use strict; | |
use warnings; | |
# single file | |
my $file = '/path/to/Lightroom x Catalog Previews.lrdata/x/x/id.lrprev'; | |
my $dest = '/path/to/jpeg/prefix'; | |
convert($file, $dest); |
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
// http://curl.haxx.se/libcurl/c/postit2.html | |
#include <stdio.h> | |
#include <string.h> | |
#include <curl/curl.h> | |
int main(int argc, char *argv[]) | |
{ | |
CURL *curl; | |
CURLcode res; |