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
unsigned char* intToHex(int n, unsigned char* bytes){ | |
int size = sizeof(bytes); | |
for(int i=0; i<size+1; i++){ | |
size--; | |
bytes[i] = ( n >> (size * 8)) & 0xFF; | |
} | |
bytes[sizeof(bytes)-1] = n & 0xFF; // last | |
return bytes; | |
} |
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
Due to the wrong format of cmake file | |
https://github.com/mfontanini/libtins/blob/master/cmake/Modules/FindPCAP.cmake | |
and current WpdPack folder structure (all folders start with a capital) | |
the only way to build libtins is to provide INCLUDE_DIR and -G option like that: | |
C:\Users\Sasha\GitHub\libtins\build>cmake ../ -DPCAP_ROOT-DIR=C:\WpdPack -DPCAP_ | |
INCLUDE_DIR=C:\WpdPack\Include -DLIBTINS_ENABLE_WPA2=0 -DLIBS_BUILD_SHARED=0 -G | |
"MinGW Makefiles" |
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
# Hey Emacs, this is a -*- makefile -*- | |
# The twitcurl library.. a Makefile for OpenWRT | |
# Makefile-fu by John Boiles | |
# 28 September 2009 | |
LIBNAME = twitcurl | |
SRC = $(LIBNAME).cpp | |
STAGING_DIR = | |
INCLUDE_DIR = $(STAGING_DIR)/usr/include | |
LINCLUDE_DIR = $(STAGING_DIR)/usr/local/include |
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
pcap.c:54:18: warning: incompatible pointer types passing 'FILE *' (aka 'struct __sFILE *') to | |
parameter of type 'const char *' [-Wincompatible-pointer-types] | |
{ printf(stdout,"(IP)\n");} | |
^~~~~~ | |
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdio.h:217:16: note: | |
expanded from macro 'stdout' | |
#define stdout __stdoutp | |
^~~~~~~~~ | |
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdio.h:259:36: note: | |
passing argument to parameter here |
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
/****************************** | |
* floppy plays the beginning | |
* of the Imperial March | |
******************************/ | |
#include <fstream> | |
#include <windows.h> | |
#include <iostream> | |
#include <string> | |
using namespace std; |
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 <iostream> | |
#include <fstream> | |
#include <string.h> // strcat | |
using namespace std; | |
int main(){ | |
char name[100]; | |
char ch; | |
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
<?php | |
$url = 'https://api.vk.com/method/wall.get?owner_id=183123381&count=1&filter="owner"'; | |
$jsonFile = file_get_contents($url); | |
// convert the string to a json object | |
$jfo = json_decode($jsonFile, true); | |
$textWall = $jfo['response'][1]['text']; | |
// get number of poems | |
$numCount = $jfo['response'][0]; | |
$randOffset = rand(1,$numCount-1); | |
// now get random poem |
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
ruby 2.1.5p273 + Rails 4.2.0 + Homebrew 0.9.5 | |
If you follow the guide from https://gorails.com/setup/osx/10.10-yosemite or similar | |
and get the nokogiri error like: | |
$ rails new myapp | |
checking for xmlParseDoc() in libxml/parser.h... no | |
checking for xmlParseDoc() in -lxml2... no | |
checking for xmlParseDoc() in -llibxml2... no | |
----- |