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
int catvars(char *buf1, char *buf2, unsigned int len1, | |
unsigned int len2){ | |
char mybuf[256]; | |
if((len1 + len2) > 256){ /* [3] */ | |
return -1; | |
} | |
memcpy(mybuf, buf1, len1); /* [4] */ | |
memcpy(mybuf + len1, buf2, len2); |
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
#include <stdio.h> | |
#include <string.h> | |
int main(void) | |
{ | |
char buff[15]; | |
int pass = 0; | |
printf("\n Enter the password : \n"); | |
gets(buff); |
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
#!/bin/sh | |
apt-get install bwm-ng curl byobu screen zsh vim-nox bison build-essential curl flex git gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev ccache | |
curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo | |
apt-get install -y mdadm | |
mdadm -C /dev/md0 --level=raid0 --raid-devices=2 /dev/xvdb /dev/xvdc | |
repo init -u https://github.com/CyanogenMod/android -b cm-12.0 | |
repo sync -j40 |
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
<script language="javascript" src="jquery-1.4.2.js"></script> | |
<SCRIPT LANGUAGE=JAVASCRIPT> | |
if (top.location != self.location) { | |
top.location=self.location; | |
} | |
</SCRIPT> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> |
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
#!/bin/bash | |
for X in "$@" | |
do | |
convert "$X" -compress jpeg -quality 50 "${X%%tiff}pdf" | |
done | |
echo "${@/tiff/pdf}" | |
pdftk "${@/tiff/pdf}" cat output out1.pdf | |
pdfopt out1.pdf finish.pdf | |
rm -rf out1.pdf |
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
-module(websocket_client). | |
-compile(export_all). | |
-on_load(init/0). | |
init() -> | |
ok = erlang:load_nif("./nif_mask", 3). | |
nif_mask(_,_,_) -> | |
exit(nif_library_not_loaded). | |
mask(Key,Data,Accu) -> | |
case Data of |
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
#include "erl_nif.h" | |
void mask(unsigned char *key, unsigned char *data, unsigned long len) | |
{ | |
unsigned int *p = (unsigned int *)data; | |
unsigned int *k = (unsigned int *)key; | |
for(int i=4; i<len; i+=4) | |
{ | |
*(p+(i-4)/4) ^= *k; | |
} |