Skip to content

Instantly share code, notes, and snippets.

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

Aly Mohamed alydemah

🏠
Working from home
View GitHub Profile
@alydemah
alydemah / C# LangGuide.txt
Last active December 11, 2017 06:05
Quick cheat sheet for C# and What’s New in C#
- What’s New in C# 7.0
NUMERIC LITERAL IMPROVEMENTS
include underscores to improve readability. These are called digit separators and are ignored by the compiler:
int million = 1_000_000;
@alydemah
alydemah / PasswordGenerator.cs
Created October 18, 2015 11:14
Part of class used for Password Generator
class RandomPasswordGenrator
{
private const string CapitalLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
private const string SmallLetters = "abcdefghijklmnopqrstuvwxyz";
private const string Digits = "0123456789";
private const string SpecialChars = "~!@#$%^&*()_+=`{}[]\\|':;.,/?<>";
}
<!-- Target container -->
<div class="react-container"></div>
<!-- React library & ReactDOM-->
<script src="https://unpkg.com/react@15.4.2/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@15.4.2/dist/react-dom.js"></script>
<script>
// Pure React and JavaScript code
@alydemah
alydemah / Javascript LangGuide.js
Last active December 18, 2017 16:40
Javascript LangGuide and What's New
//Javascript LangGuide and What's New
//- Modules
//- Let and Const
// Const is variale that can't be changed.
How to use Git & GitHub
a repo is container for a project you are working on it and you want to track with Git
Commit
Commit History, It's like save points
Start
Finished header
@alydemah
alydemah / gulpfile.js
Last active December 12, 2017 12:40
gulpfile.js
"use strict";
var gulp = require('gulp');
var connect = require('gulp-connect'); // Run local dev server
var open = require('gulp-open'); // open URL in Browser
var browserify = require('browserify'); // Bundel JS
var reactify = require('reactify'); // Transforms React JSX to JS
var source = require('vinyl-source-stream'); // Use conventional text stream with gulp
var concat = require('gulp-concat'); // Contenates files
var lint = require('gulp-eslint'); // lint JS files, including JSX
There are four different screen sizes:
Desktop (md)
Tablets (sm)
Phones (xs)
Large desktops (lg)
-- CSS new Layput flexbox
@alydemah
alydemah / React_Recipes.js
Last active December 28, 2017 07:26
React Recipes
// StartRating Component
const Star = ({ selected=false, onClick=f=>f }) =>
<div className={(selected) ? "star selected" : "star"}
onClick={onClick}>
</div>
Star.propTypes = {
selected: PropTypes.bool,
@alydemah
alydemah / React_PropTypes.js
Last active December 28, 2017 07:26
React: PropTypes
{/*
*/}
// No Arguments
// Single Argument
// Multiple Arguments