Skip to content

Instantly share code, notes, and snippets.

struct foo <
i i i
n n n
t t t
f b b
o a a
o r z
= = =
>
@Hamled
Hamled / fizzbuzz.c
Last active February 12, 2021 10:51 — forked from ben0x539/fizzbuzz.c
#define MAX_DIGITS 5
#define NUMBER *p-- = itoa(i, buf); buf += MAX_DIGITS+1; --i;
#define FIZZ *p-- = "Fizz"; --i;
#define BUZZ *p-- = "Buzz"; --i;
#define FIZZBUZZ *p-- = "FizzBuzz"; --i;
char* itoa(int value, char* s) {
size_t i = MAX_DIGITS;
s[i--] = '\0';
#Windows 10 Decrapifier 18XX/19XX
#By CSAND
#Oct 22 2020
#
#
#PURPOSE: Eliminate much of the bloat that comes with Windows 10. Change many privacy settings to be off by default. Remove built-in advertising, Cortana, OneDrive, Cortana stuff (all optional). Disable some data collection.
# Clean up the start menu for new user accounts. Remove a bunch of pre-installed apps, or all of them (including the store). Create a more professional looking W10 experience. Changes some settings no longer
# available via GPO for Professional edition. All of this without breaking Windows.
#
#DISCLAIMER: Most of the changes are easily undone, but some like removing the store are difficult to undo. You should use local/group policy to remove the store if you want.
@Hamled
Hamled / routes.rb
Last active September 12, 2018 01:53 — forked from advorak/routes.rb
resource 'definitions'
scope controller: 'definitions' do
%w(flashcards multichoice type).each do |name|
get name
end
end
#resource 'definitions' do
# get 'flashcards'
@Hamled
Hamled / dataset-readme.md
Created January 12, 2017 19:23
Ada Developers Academy - Cohort 8 Admissions - Dataset README

C8 Data Question - Dataset README

This document provides assumptions and definitions for the Loan Volume Reports.

Data Source

Common Origination and Disbursement (COD) System

Data Refresh Schedule

Data will be refreshed each quarter for at least seven prior quarters to account for adjustments. After the adjustment period, the data will be final.

Assumptions

# FIRST edit the next line to have the path to your project-forks folder
# Something like ~/Desktop/ada/project-forks
export PROJECTS=~/path/to/your/project-forks
# THEN run these lines (unmodified)
brew install python
pip install virtualenv
pip install virtualenvwrapper
echo "export WORKON_HOME=~/.virtualenvs" >> ~/.bashrc
@Hamled
Hamled / petstore.xml
Created January 9, 2016 00:45
Two different ways to convert an XML document to JSON
<petStore>
<pets>
<dog>
<id>515</id>
<name>Rusty</name>
<breed>ChocolateLabrador</breed>
</dog>
<dog>
<id>516</id>
<name>Lulu</name>
@Hamled
Hamled / md5substr.c
Created December 21, 2015 22:16
Finding MD5 hash collisions with specific plaintext prefix
/*
* generate collisions for truncated md5 hashes
* e.g., substr(md5($pass), 0, 8)
* cc -o md5substr md5substr.c -march=native -O3 -funroll-loops -pthread
*
* Copyright 2013, epixoip. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
@Hamled
Hamled / md5substr.c
Last active December 21, 2015 22:14
Finding MD5 hash collisions with specific plaintext prefix
/*
* generate collisions for truncated md5 hashes
* e.g., substr(md5($pass), 0, 8)
* cc -o md5substr md5substr.c -march=native -O3 -funroll-loops -pthread
*
* Copyright 2013, epixoip. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
@Hamled
Hamled / _README_.md
Last active December 22, 2015 07:45
Advent of Code 2015

Advent of Code 2015

http://adventofcode.com/

My Attempts

For this coding challenge/exercise I decided to restrict myself to only single-line responses. In order to achieve this I employ shell scripting to download the problem input, and Ruby code passed directly to an interpreter in order to transform it.

More important than the literal single-line nature of the code is the single "statement" aspect. I've prefered to use Ruby features and library methods that chain together, resulting in one long run-on