Skip to content

Instantly share code, notes, and snippets.

View arod2634's full-sized avatar

Alex Rodriguez arod2634

View GitHub Profile
@arod2634
arod2634 / array-loops.m
Last active August 29, 2015 13:57
Looping though an NSMutableArray
NSMutableArray *myParty = [[NSMutableArray alloc] init];
[myParty addObject:@"Name: Alex's Awesome Party"];
[myParty addObject:@"Address: 123 Awesome Street"];
[myParty addObject:@"Date: May 17"];
// Manually output the value in each index
NSLog(@"%@",[myParty objectAtIndex:0]);
NSLog(@"%@",[myParty objectAtIndex:1]);
NSLog(@"%@",[myParty objectAtIndex:2]);
@arod2634
arod2634 / Exercise-1---Using-jQuery.markdown
Created March 28, 2014 04:30
A Pen by Alex Rodriguez.
@arod2634
arod2634 / linear-layout.xml
Created March 1, 2015 23:04
Android Linear Layout Example
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="One"
@arod2634
arod2634 / linear-layout-vertical.xml
Created March 1, 2015 23:13
Android Linear Layout Vertical Example
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".25"
@arod2634
arod2634 / relative-layout-example
Last active August 29, 2015 14:16
Android Relative Layout Example
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@arod2634
arod2634 / relative-layout-vertical-example
Created March 1, 2015 23:28
Android Relative Layout Vertical Example
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<TextView
android:layout_width="match_parent"
android:layout_height="150dp"
@arod2634
arod2634 / exercise-1-solution
Last active August 29, 2015 14:16
Android 100 Exercise 1
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
@arod2634
arod2634 / input-place-holder.html
Created June 15, 2012 14:57
Input field Place Holder
<input onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Email Address':this.value;" id="footerEmail" name="email" type="text" value="Email Address" />
@arod2634
arod2634 / custom-wp-menus.php
Created September 21, 2012 03:05
Customize Wordpress Admin Menus
<?php
//Remove any unnecessary admin menus & sub-menus
function remove_menus () {
global $menu;
$restricted = array(__('Links' , 'themeName'), __('Comments' , 'themeName'));
// Additional options - > __('Dashboard'), __('Pages'), , __('Comments'), __('Media')
end ($menu);
while (prev($menu)){
$value = explode(' ',$menu[key($menu)][0]);
if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
@arod2634
arod2634 / custom-wp-widgets.php
Created September 21, 2012 19:46
Customize Wordpress Theme Widgets
<?php
/*
* Remove any unwanted widgets...
*
* WP_Widget_Pages = Pages Widget
* WP_Widget_Calendar = Calendar Widget
* WP_Widget_Archives = Archives Widget
* WP_Widget_Links = Links Widget
* WP_Widget_Meta = Meta Widget
* WP_Widget_Search = Search Widget