Skip to content

Instantly share code, notes, and snippets.

View Shereef's full-sized avatar
🏠
Working from home

Shereef Marzouk Shereef

🏠
Working from home
View GitHub Profile
$wh: #fff;
$bl: #000;
$col_14: #141414;
//*** ---------------------------------------------------------------------------------
//*** Global variables for edit forms ***//
//***
$acme-input-border-radius: 2px;
$acme-input-border-color: #656565;
git clone https://github.com/GoogleCloudPlatform/cloudml-samples.git
cd cloudml-samples/census/estimator
mkdir data
gsutil -m cp gs://cloud-samples-data/ml-engine/census/data/* data/
@Shereef
Shereef / README.md
Last active April 21, 2022 12:26 — forked from Remiii/README.md
How to delete Vault (AWS Glacier)

How to delete Vault (AWS Glacier)

This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).

Step 1 / Retrive inventory

$ aws glacier initiate-job --job-parameters "{\"Type\": \"inventory-retrieval\"}" --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION
@Shereef
Shereef / GsonRequest.java
Created July 10, 2016 00:17 — forked from ficusk/GsonRequest.java
A Volley adapter for JSON requests that will be parsed into Java objects by Gson.
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
#import "XYZAppDelegate.h"
@interface XYZParent : NSObject
@property (atomic) NSMutableArray *children;
@end
@implementation XYZParent
@end
@Shereef
Shereef / Build animations
Created November 10, 2015 21:25 — forked from hamadmj/Build animations
Challenge 3
In this challenge, we require a standalone project that will test your abilities with CoreAnimation as well as basic KVC & KVO skills. You are free to use any resources you’d like to make use of.
# Project specification
The project should be a universal application (iPhone & iPad) that is a showcase of a couple of animations. The idea is to have a way for the user of the application to select an animation, and a preview of that animation will be displayed continuously forever. You can assume that the number of animations is exactly two. No more, no less.
# Animation Details
The animations must utilize CAAnimation subclasses only. For simplicity, you may not use CAAnimation delegation methods “animationDidStart” and “animationDidStop”. The animating object must observe a model object’s changes using KVO. The model object is a simple NSObject subclass with some properties that are needed by the animation. Add an NSTimer in that class to vary the values from time to time using random or predetermined values fr
@interface XYZWaitController : UIViewController
@property (strong, nonatomic) UILabel *alert;
@end
@implementation XYZWaitController
- (void)viewDidLoad
{
@Shereef
Shereef / CommUtils.java
Last active August 29, 2015 14:01
Communication Utilities By Shereef Marzouk
/**
* @author Shereef Marzouk
*/
public class CommUtils {
/**
* @param hostNameOrIP
* : the host name or IP<br/>
* @param webService
* : the web service name<br/>
@Shereef
Shereef / gist:8685666
Created January 29, 2014 10:51
Android JSON connection
/**
* @param hostNameOrIP
* : the host name or IP<br/>
* ex: google.com
* @param webService
* : the web service name<br/>
* ex: testWCF
* @param classOrEndPoint
* : the file or end point<br/>
* ex: testWCF.svc
@Shereef
Shereef / Connection.java
Last active December 13, 2015 22:19
A simple way to make connection to a service
package net.shereef.connection;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;