Skip to content

Instantly share code, notes, and snippets.

View sqbing's full-sized avatar

Rider Woo sqbing

  • Microsoft
  • Suzhou, Jiangsu, China
View GitHub Profile
loginResponse: Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/tornado/web.py", line 1141, in _when_complete
callback()
File "/Library/Python/2.7/site-packages/tornado/web.py", line 1162, in _execute_method
self._when_complete(method(*self.path_args, **self.path_kwargs),
File "/Library/Python/2.7/site-packages/tornado/web.py", line 183, in post
raise HTTPError(405)
HTTPError: HTTP 405: Method Not Allowed
@sqbing
sqbing / GetPartitionSize.c
Created April 15, 2014 01:29
Get Partition Size
#include <stdio.h>
#include <sys/vfs.h>
#include <string.h>
#include <errno.h>
int main(int argc, const char *argv[])
{
if(argc < 2){
printf("%s PATH\n", *argv);
return 0;
@sqbing
sqbing / fft.cpp
Created January 20, 2014 08:01
Segment fault with Aquila::OouraFft::ifft()
#include <iostream>
#include <aquila/global.h>
#include <aquila/source/WaveFile.h>
#include <aquila/tools/TextPlot.h>
#include <aquila/transform/FftFactory.h>
#include <algorithm>
#include <cstdlib>
int main(int argc, const char *argv[])
{
@sqbing
sqbing / setprocname.c
Created October 17, 2013 08:36
Set process name in Linux/Mac.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int setproctitle(const char ***ppp_argv, const char *title)
{
int i = 0;
int size = 0;
const char **pp_argv = *ppp_argv;