Skip to content

Instantly share code, notes, and snippets.

View donn's full-sized avatar

Mohamed Gaber donn

View GitHub Profile
@donn
donn / AndroidHTTP101.md
Last active January 14, 2020 20:51
Using Volley, Gson and Picasso for Android Newbies

Android HTTP 101

Manifest

Right below the <manifest /> tag:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<user-permission android:name="android.permission.INTERNET" />

build.gradle

@donn
donn / Commands.sh
Last active September 10, 2023 18:40
Shell Nonsense
# These are commands I find all around the internet that I think are interesting or useful, so I'll keep 'em here:
# (None of these are complex enough to qualify for copyright in my opinion)
# Generate MAC Address
# Credit: https://discussions.apple.com/message/29028339#message29028339
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'
# LS alias with all the good stuff
alias ll='ls -lAFh'
@donn
donn / Types.h
Last active September 30, 2018 12:32
Convenience header for dealing with C types.
/*
Types.h
Makes C data types more convenient to use. A bit Rusty.
C/C++/Objective-C
--
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
@donn
donn / CarryLookAhead.swift
Last active June 24, 2017 00:14
Output a boolean expression for any 1st level carry lookahead.
/*
Carry Look Ahead
Writes a boolean expression for a 1st level carry lookahead.
Modify location as you see fit. Wrote it while immensely confused at an assignment.
Swift
--
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
@donn
donn / Target.h
Last active February 13, 2017 15:51
Find out which OS this header file is compiling on.
/*
Target.h
Finds the operating system it is compiling for and has the compiler emit a message. Supports all major OSes.
C/C++/Objective-C
--
This is free and unencumbered software released into the public domain.