Skip to content

Instantly share code, notes, and snippets.

int my_strstr(char *haystack, char *needle)
{
int offset = -1;
//for (s = str; *s; ++s);
char *_haystack;
char *_needle = needle; // wtf
for (_haystack = haystack; *_haystack; ++_haystack)
{
if (*_haystack == *_needle)
#include <stdio.h>
#include <stdlib.h>
int my_strlen(char *str);
void my_strcpy(char *source, char *target);
int my_strstr(char *haystack, char *needle);
int main(int argc, char *argv[])
{
if (argc == 1)
#include <stdio.h>
#include <stdlib.h>
int my_strlen(char *str);
void my_strcpy(char *source, char *target);
int my_strstr(char *haystack, char *needle);
int main()
{
char *wut = "123wuwut456\0";
@Riketta
Riketta / HashTable.cpp
Created December 11, 2015 12:34 — forked from Karlina-Bytes/HashTable.cpp
Hash Table Example
//*****************************************************************
// HashTable.cpp
// HashTable
//
// Created by Kar Beringer on June 18, 2014.
//
// This header file contains the Hash Table class definition.
// Hash Table array elements consist of Linked List objects.
//*****************************************************************
@Riketta
Riketta / WindwardHack.cs
Last active January 1, 2016 17:55
Windward Reflexil patch for XP and Gold (rowneg@bk.ru). Tested on version 2015-12-30.0
// Windward Reflexil patch for XP and Gold (rowneg@bk.ru)
#region " Imports "
using System;
using System.Collections.Generic;
using System.Text;
using TNet;
#endregion
#region " Referenced assemblies "
// - mscorlib v2.0.5.0
@Riketta
Riketta / dec2bin.cpp
Last active March 2, 2016 17:31
dec2bin with stroke
// version 3, final
#include <iostream>
#include <string>
#include <vector>
#include <cstdlib> // atoi
#include <iomanip> // set, setfill
#include <cmath> // pow
using namespace std;
@Riketta
Riketta / setdllcharacteristics.cpp
Created March 20, 2016 13:38
setdllcharacteristics
/*
setdllcharacteristics
Source code put in public domain by Didier Stevens, no Copyright
https://DidierStevens.com
Use at your own risk
Editor tab stop value = 2
Shortcomings, or todo's ;-)
@Riketta
Riketta / stl_vector.h
Created April 10, 2016 10:32
STL Vector
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
@Riketta
Riketta / huffmancode.cpp
Last active June 5, 2019 04:22
Huffman Encoding - Coder + Decoder
// developed by Riketta - rowneg@bk.ru
#include <iostream>
#include <vector>
#include <list>
#include <map>
using namespace std;
class Node
@Riketta
Riketta / hex2bin.cpp
Created April 14, 2016 23:41
hex2bin throw inline assembly
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main()
{
cout << "Enter hex nubmer:" << endl;
int n = 0;