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 adjustPicOrientation($full_filename, $type = 'jpeg'){ | |
$exif = exif_read_data($full_filename); | |
if($exif && isset($exif['Orientation'])) { | |
$orientation = $exif['Orientation']; | |
if($orientation != 1){ | |
if($type == 'jpeg'){ | |
$img = imagecreatefromjpeg($full_filename); | |
} else if($type == 'png') { | |
$img = imagecreatefrompng($full_filename); |
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
server | |
{ | |
listen 80; | |
server_name xxxxxx; | |
location / { | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://xxxxxx; |
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
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<!-- ldsn --> | |
<ins class="adsbygoogle" | |
style="display:block" | |
data-ad-client="ca-pub-7536831447654223" | |
data-ad-slot="2809102979" | |
data-ad-format="auto"></ins> | |
<script> | |
(adsbygoogle = window.adsbygoogle || []).push({}); | |
</script> |
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
atmega8_8M.name=ATmega8_8MHz | |
atmega8_8M.upload.protocol=arduino | |
atmega8_8M.upload.maximum_size=7168 | |
atmega8_8M.upload.speed=115200 | |
atmega8_8M.upload.tool=avrdude | |
atmega8_8M.bootloader.low_fuses=0xa4 | |
atmega8_8M.bootloader.high_fuses=0xdc | |
atmega8_8M.bootloader.path=optiboot |
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 | |
$ch = curl_init(); | |
curl_setopt ($ch, CURLOPT_URL, "http://www.jwc.ldu.edu.cn/cj"); | |
curl_setopt ($ch, CURLOPT_REFERER, "http://www.jwc.ldu.edu.cn/cj"); | |
curl_exec ($ch); | |
curl_close ($ch); | |
header('Location:http://www.jwc.ldu.edu.cn/cj'); |
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 pygame | |
# Define some colors | |
BLACK = ( 0, 0, 0) | |
WHITE = ( 255, 255, 255) | |
# This is a simple class that will help us print to the screen | |
# It has nothing to do with the joysticks, just outputing the | |
# information. | |
class TextPrint: |
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
#******************************************************************# | |
# /etc/ppp/chat/unicom-chat # | |
# this is the chat script for unicom # | |
# *****************************************************************# | |
ABORT "NO CARRIER" | |
ABORT "NO DIALTONE" | |
ABORT "ERROR" |
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
##******************************************************************# | |
# /etc/ppp/peers/unicom-peers # | |
# this is ppp script for use chinaunicom's WCDMA data service # | |
#******************************************************************# | |
# note: If the kernel creat ttyUSB0 ttyUSB1 ttyUSB2 for our 3G dongle | |
# We should use ttyUSB2 for AT command | |
#/dev/ttyUSB2 | |
115200 |
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
# if switch success, run our script | |
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="1506",MODE="0666", RUN+="/sbin/3g-dongle-cfg.sh" |
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
#!/usr/bin/php | |
<?php | |
$tmpl_id = 'PT0X_93niu22Ti3CYqEL0bXPkflJ06zUK5Yt3_KCF_g'; | |
$appid = 'wx54602a12c477c961'; | |
$secret = 'dde1ceb8fb98cb3ec0a70e9f0849221b'; | |
$user_id = 'oUeGNtz41L35y49a_xqXGjWeBazU'; | |
$access_url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$appid.'&secret='.$secret; | |
$tmpl_url = 'https://api.weixin.qq.com/cgi-bin/message/template/send?access_token='; |