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/python3 | |
# -*- coding: utf-8 -* | |
import sys | |
import serial | |
import time | |
def main(f, ser): | |
while True: | |
data = serial.to_bytes([0xA5,0x5A,0x02,0x80,0xaa]) | |
ser.write(data) |
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
package Mojo::IRC::Server; | |
$Mojo::IRC::Server::VERSION = "1.0.4"; | |
use strict; | |
use Encode; | |
use Encode::Locale; | |
use Carp; | |
use Parse::IRC; | |
use Mojo::Webqq; | |
use Mojo::Util qw(md5_sum); | |
use Mojo::IOLoop; |
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
--------------------------------------------------------------------------- | |
--- Fair layouts module for awful | |
-- | |
-- @author wxg | |
-- @copyright 2015 Josh wxg | |
-- @release @AWESOME_VERSION@ | |
-- @module awful.layout.suit.firefox | |
--------------------------------------------------------------------------- | |
-- Grab environment we need |
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
# _get_online_list_info.pm | |
use JSON; | |
use Webqq::Client::Util qw(console); | |
sub Webqq::Client::_get_online_list_info { | |
my $self = shift; | |
return undef if $self->{type} ne 'smartqq'; | |
my $ua = $self->{ua}; | |
my $api_url = 'http://d.web2.qq.com/channel/get_online_buddies2'; | |
my %r = ( |
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
use IO::Socket::UNIX; | |
use JSON; | |
use AnyEvent; | |
use AnyEvent::Handle; | |
use Data::Dumper; | |
my $socket_path='/tmp/ddd.sock'; | |
unlink $socket_path if -e $socket_path; | |
my $socket = IO::Socket::UNIX->new( |
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 | |
use lib '/home/wxg/.weechat/perl/'; | |
use Exporter 'import'; | |
use Webqq::Client; | |
use Digest::MD5 qw(md5_hex); | |
use Encode; | |
use Encode::Locale; | |
use IO::Socket::UNIX; | |
use threads; |
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/bash | |
num=1 | |
if [ $# -gt 0 ]; then | |
num=$1 | |
fi | |
git config --get core.email > /dev/null | |
if [ $? -ne 0 ]; then | |
exit 0 | |
fi |
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
# Maintainer: shadyabhi <abhijeet.1989@gmail.com> | |
# Author : Bram Cohen | |
pkgname=python2-google-api-python-client-hg | |
_realname=google-api-python-client | |
pkgver=1.2 | |
pkgrel=1 | |
pkgdesc="Google API Client for Python" | |
url="http://code.google.com/p/google-api-python-client/" | |
arch=('any') |
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/python2 | |
# -*- coding: utf-8 -*- | |
from oauth2client.client import flow_from_clientsecrets | |
from oauth2client.file import Storage | |
import httplib2 | |
from oauth2client.tools import run | |
from apiclient.discovery import build | |
#~ flow = flow_from_clientsecrets('client_secrets.json', | |
#~ scope='https://www.googleapis.com/auth/tasks', | |
#~ redirect_uri='urn:ietf:wg:oauth:2.0:oob') |
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
require 'cairo' | |
require 'imlib2' | |
--~ require 'cairo_imlib2_helper' | |
--~ cairo_draw_image('/home/Data/pictres/500px/18.jpg' , cs, 0, 0, 0.2, 0.2) | |
function conky_images() | |
if conky_window == nil then return end | |
local sw = conky_window.width | |
local sh = conky_window.height | |
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, sw, sh) |