Skip to content

Instantly share code, notes, and snippets.

View beyondkmp's full-sized avatar
🎯
Focusing

beyondkmp beyondkmp

🎯
Focusing
View GitHub Profile
@echo off
setlocal enabledelayedexpansion
echo %~dp0
cd %~dp0
set collectFolderName=CollectData
set collectPath=%userprofile%\desktop\Ringcentral\%collectFolderName%
echo %collectPath%
if exist %collectPath% (
rd /s /q %collectPath%
==> arch2: Configuring and enabling network interfaces...
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
INFO ssh: SSH is ready!
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG guest: Searching for cap: configure_networks
DEBUG guest: Checking in: arch
DEBUG guest: Found cap: configure_networks in arch
@beyondkmp
beyondkmp / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@beyondkmp
beyondkmp / isPalindrome.c
Created July 23, 2015 08:42
Given a singly linked list, determine if it is a palindrome.
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* struct ListNode *next;
* };
*/
struct ListNode* reverseList(struct ListNode* head) {
@beyondkmp
beyondkmp / isSymmetric.c
Created July 22, 2015 06:29
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* struct TreeNode *left;
* struct TreeNode *right;
* };
*/
bool isChildSymmetric(struct TreeNode* p, struct TreeNode* q) {
This file has been truncated, but you can view the full file.
../eyyxo.torrent:
Name: Hacked Team
Size: 415768052618 (387G)
Announce: udp://coppersurfer.tk:6969/announce
Files:
Amministrazione/01 - CLIENTI/1 - Commesse/1 - Commesse 2011/Commessa001.2011 Royal.xls 59392 (58K)
Amministrazione/01 - CLIENTI/1 - Commesse/1 - Commesse 2011/Commessa002.2011 Royal.xls 59392 (58K)
#!/bin/bash
#
# Example of how to parse short/long options with 'getopt'
#
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo "$OPTS"
@beyondkmp
beyondkmp / download.py
Created September 15, 2013 09:52
简单说一下:download类继承了threading.Thread类,并重写了run函数,目的是只要队列不为空,则不停的从队列中取出资源真实链接地址调用wget下载,如果为空则退出线程。startDown函数是多线程下载的接口,里面的参数分别为:url--资源的网页,rule--正则表达式匹配方式,num--开启的线程数,start--正则中匹配真实链接的起始位置,end--正则中匹配真实链接的结束位置,decoding--资源页面采用的编码方式,默认是utf8。
from urllib2 import urlopen
import re
import Queue
import threading
import os
class download(threading.Thread):
def __init__(self,que):
threading.Thread.__init__(self)
self.que=que
def run(self):