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
| """ | |
| Author: Matze | |
| Date: July 2012 | |
| Website: https://github.com/ma4a | |
| About functions: | |
| *creates same recursive folder structure in parallel with resized images | |
| *you have two folder structures. the first untouched one with the source files and the one with resized images and copied videos | |
| *resize any found image that's larger than needed -> EXIF data not copied | |
| *just copy any image that's smaller than needed - no resize necessary -> EXIF data may be copied |
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 re, string, sys, time, urllib | |
| """ | |
| *tested with Easybox 802 Firmware 20.02.233 | |
| """ | |
| #SETTINGS *** only change values in this area | |
| routerIP = "192.168.0.1" #address of router | |
| routerUser = "root" #default: root | |
| routerPW = "secret123" #pass for login |
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
| #GPIO-Port-Config: http://www.elinux.org/File:GPIOs.png | |
| import os, time | |
| def setGPIOValue(gpioNr, gpioValue): | |
| file = "/sys/class/gpio/gpio" + gpioNr + "/value" | |
| fileH = open(file, "w") | |
| fileH.write(gpioValue) | |
| fileH.close() | |
| print "Set value of GPIO" + gpioNr + " to " + gpioValue |
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
| <?php | |
| function commentworker($array, $s = '<br><br>') | |
| { | |
| if (is_array ($array)) | |
| { | |
| $output = ''; | |
| foreach ($array as $v) | |
| { | |
| $output .= commentworker($v, $s); | |
| } |
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
| <?php | |
| function mergePNGs($dst_fileURL, $temp_fileURL) | |
| { | |
| $resolutionX = 1000; | |
| $resolutionY = 1000; | |
| $dst_im = imagecreatefrompng($dst_fileURL) or die('Error reading image file'); | |
| $src_im = imagecreatefrompng($temp_fileURL) or die('Error reading image file'); | |
| imagealphablending($dst_im, true); |
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
| public static boolean putImage(Bitmap image) { | |
| ByteArrayOutputStream baos = null; | |
| HttpClient httpclient = new DefaultHttpClient(); | |
| httpclient.getParams().setParameter(CoreProtocolPNames.USER_AGENT, APP_UA); //UserAgent | |
| URI uri = null; | |
| try { | |
| uri = new URI("http://your.url.to.upload/the/file/via/PUT/123"); | |
| } catch (URISyntaxException e) { | |
| e.printStackTrace(); | |
| } |
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 | |
| #options; change if needed :) | |
| tmpdir='/tmp/' #trailing slash needed | |
| #don't change things below. | |
| seafile_filename_regex='(seafile_[0-9.]{1,11}_'$platform'.deb)' | |
| seafile_latest_version='' | |
| seafile_deb=$tmpdir'seafile_latest.deb' |
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 | |
| vivaldi_url=$(curl -s https://vivaldi.com/download/ | grep -oP '(https:\/\/[a-z0-9-.\/_]*_amd64.deb)') | |
| vivaldi_filename=$(basename $vivaldi_url) | |
| echo "current installed version: $(vivaldi --version)"; | |
| echo "available version: $vivaldi_filename"; | |
| read -p "Download the update? [y/N]" -n 1 -r; | |
| echo | |
| if [[ $REPLY =~ ^[Yy]$ ]] |
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
| <?php | |
| /* | |
| Plugin Name: Preview URL | |
| Plugin URI: http://yourls.org/ | |
| Description: Preview URLs before you're redirected there | |
| Version: 1.0 | |
| Author: Ozh | |
| Author URI: http://ozh.org/ | |
| Version: 1.1 |
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
| javascript:(function(){window.open('http://www.printfriendly.com/print/?url='+encodeURIComponent(location.href),'_blank','menubar=no,height=900,width=750,toolbar=no,scrollbars=no,status=no,dialog=1');})(); |
OlderNewer