Skip to content

Instantly share code, notes, and snippets.

View saymagic's full-sized avatar
🎯
Focusing

saymagic saymagic

🎯
Focusing
View GitHub Profile
@rambolee
rambolee / update-dnsmasq-from-gfwlist.py
Last active September 23, 2024 11:10
升级 小米路由器3 可以ssh 可以 Shadowsocks [Tags]: 小米路由, 小米路由3, 小米路由器, 小米路由器3, ssh, shadowsocks
#!/usr/bin/env python
#coding=utf-8
#
# Generate a list of dnsmasq rules with ipset for gfwlist
#
# Copyright (C) 2014 http://www.shuyz.com
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules
import urllib2
import re
anonymous
anonymous / NrGqmr.markdown
Created June 7, 2016 02:09
NrGqmr
@stkevintan
stkevintan / baiduAPI
Created January 28, 2014 02:46
SHELL:Baidu Music API
#!/bin/bash
#脚本作用,调用mplayer播放百度音乐,需要预装mplayer
#定义各种变量
title=${1:-'大约在冬季'} #歌曲名
performer=${2:-'齐秦'} #歌手名
getmp3url(){
url='http://box.zhangmen.baidu.com/x?op=12&count=1&title='$title'$$'$performer'$$$$'
xml=`curl -s ''$url''`
@lecho
lecho / shadow.xml
Created September 7, 2013 07:01
Android shadow drawable xml.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Drop Shadow Stack -->
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
@marcetcheverry
marcetcheverry / mapread.c
Created May 25, 2011 14:05
mmap and read/write string to file
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
int main(int argc, const char *argv[])
{