Skip to content

Instantly share code, notes, and snippets.

@wcypierre
wcypierre / gist:4405322
Last active December 10, 2015 08:08
[Article]Workaround for grep and Logcat, dmesg, and last_kmsg on Windows
In this article, I will explain some of the confusions that may occur whilst using grep in logcat, dmesg, kmsg and last_kmsg on different platforms,mainly between Unix(Linux based such as ubuntu, linux mint, fedora, BSD based such as netbsd, freebsd, and even Mac) and Windows(Windows XP, Windows Vista, Windows 7, Windows 8 and etc).
[SIZE="4"][B]Requirements[/B][/SIZE]:
[LIST=1]
[*]Known about the existence of logcat, dmesg, kmsg, and last_kmsg and have tried logging it at least once
[*]Know some basic knowledge of batch/bash(cmd/terminal)
[*]Using Windows OS(The problem only lies on Windows, so if you're using Mac or Linux then you're fine)
[/LIST]
Although this is a rather technical article, but I will make it as simple as possible for all of the users to understand :)
@wcypierre
wcypierre / gist:4405324
Last active December 10, 2015 08:08
[HOWTO] Setup Linux shell on Windows | Allows Windows to run Linux commands!
[IMG]http://i1352.photobucket.com/albums/q647/wcypierre/XDA%20Linux%20Shell%20Tutorial/11_zpsc34518c4.png[/IMG]
Want to do this on your Windows OS?
To install a linux shell on Windows, there's a few solutions solutions that I usually prefer:
1. Msysgit
2. Cygwin
3. Powershell
In this tutorial, Msysgit is the program that will be installed as apart from giving you a linux shell, it gives you access to do git related things(clone a repo, fork repo) which is a very good plus :)
If you have any problems, please tweet me @wcypierrenet or email me @ wcypierre@gmail.com or find me at xda by the username of wcypierre for any AIOlog related problems ONLY
Hi, this readme will serve as a small intro in guiding newbies to use adb and fastboot.
First, we need to go to the command prompt(known as cmd) to do the things that you wanted(both adb and fastboot requires the same program which is cmd)
To access Command Prompt(CMD):
1. Press Start button + R
2. A box will appear, type "cmd"(without quotes) and press enter
@wcypierre
wcypierre / ua_xss.php
Created March 3, 2013 02:13
User Agent XSS for PoC Script
<?php
if(!function_exists('curl_init'))
{
die("cURL is not installed or not enabled. Please install it and/or enable it");
}
/* To show any errors that may exist when you edit the code, can be set to 0 when it is in production mode */
error_reporting(-1);
@wcypierre
wcypierre / mh_modified.zsh-theme
Created June 23, 2013 06:53
Oh My Zsh Mh Theme Modified
# mh theme
# preview: http://cl.ly/1y2x0W0E3t2C0F29043z
function toon {
echo -n ""
}
# features:
# path is autoshortened to ~30 characters
# displays git status (if applicable in current folder)
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="mh"
# Example aliases
@wcypierre
wcypierre / VLC XVideo Adaptor Fix
Created June 28, 2013 18:32
[VLC]xcb_xv vout display error: no available XVideo adaptor - Patch
xcb_xv vout display error: no available XVideo adaptor
Set Video Output to X11 Video Output(XCB)
@wcypierre
wcypierre / c_string empty
Last active December 19, 2015 17:09
[Howto] Empty a c-string
To empty the string(set strlen() to 0):
string[0] = '\0';
To empty the string till the first null character:
memset(string, 0, strlen(string));
To empty the string from the start till the end(for static array):
memset(string, 0, sizeof(string));
@wcypierre
wcypierre / gist:5989871
Created July 13, 2013 07:49
[Posix UDP] What to consider when coding for the multithreaded udp server with thread pool
1. The socket's file descriptor must be global(if you wanted to share the socket)
2. You must pass the sizeof the destination length(sizeof(client_addr)) into the thread in pthread_create as if you do not then you won't get a correct result as the client_addr is a pointer to sockaddr_in instead of sockaddr_in, so the return value of sizeof() won't be the one that we wanted
@wcypierre
wcypierre / gist:5990139
Created July 13, 2013 09:20
[C/C++] strcat.S: No such file or directory fix
strcat.S: No such file or directory
Its either you didn't include <string.h> or <cstring>, or the buffer size is too small so try to allocate the string into another string