Skip to content

Instantly share code, notes, and snippets.

View IshamMohamed's full-sized avatar
:shipit:
() => {}

Isham Mohamed IshamMohamed

:shipit:
() => {}
View GitHub Profile
using System.Net;
//this method can be called in a button tap event
private void calculate()
{
string calculationText = txtInput.Text;
try
{
WebClient wc = new WebClient();
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<button onclick="getWeather(31.12819929911196,84.55078125,function (data) {
console.log('weather data received');
314159265358979323846264338327950288419716939937510
58209749445923078164062862089986280348253421170679
82148086513282306647093844609550582231725369154495
87196202546254399102534602031340359642843665440272
12069215943595139508012475692954599679411918121173
42942063040293577778783047052931650057536697320417
07972854902135844325625298889420641258066664202073
68475692618677620816824692229984289511080718876068
32100239939757234316322022119788183517677868967303
19141416286753270466001648497435820992474374991568
@IshamMohamed
IshamMohamed / ColorfulChristmasTree.cs
Created December 25, 2016 14:30
Draws a very colorful Christmas tree with segments.
using System;
namespace ColorfulChristmasTree
{
class Program
{
const int HEIGHT = 5;
const int SEGMENTS = 4;
static void Main(string[] args)
@IshamMohamed
IshamMohamed / ListviewWithSearch.cs
Created March 19, 2017 17:23
ListviewWithSearch
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
xmlns:i18n="clr-namespace:One;assembly=One"
xmlns:local="clr-namespace:One;assembly=One"
xmlns:controls="clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin.Abstractions"
prism:ViewModelLocator.AutowireViewModel="True"
x:Class="One.Views.KontaktePage"
Title="{i18n:Translate Text=kontakte}">
@IshamMohamed
IshamMohamed / index.html
Created August 16, 2017 08:39
Emoji HTML
😄
<i>😄</i>
<b>😄</b>
<u>😄</u>
<?php
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, DELETE, PUT, PATCH, OPTIONS');
header('Access-Control-Allow-Headers: token, Content-Type');
header('Access-Control-Max-Age: 1728000');
header('Content-Length: 0');
header('Content-Type: text/plain');
die();
}
@IshamMohamed
IshamMohamed / Angular Client 1_3.html
Created October 16, 2017 06:06
AngularJS Instant Search
<!DOCTYPE html>
<html>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="customersCtrl">
<p>Name: <input type="text" ng-model="name.Name"></p>
<ul>
<li ng-repeat="x in names | filter:name">
<p ng-bind-template="{{x.Country }}"></p>
</li>
@IshamMohamed
IshamMohamed / Program.cs
Created November 13, 2017 08:11
C# 7.1 in VS 2015
class Program
{
static async Task Main(string[] args)
{
await Task.Delay(5000);
Console.Beep();
}
}
"markets" : ["US","CA","AT","AU","BE","CH","CN","DE","DK","FI","FR","GB","HK","MO","EU","IT","JP","MX","NL","NO","SE","LI", "AE","BR","IN","NZ","SG","KR","ZA","TW"],
"otherEU" : ["BG","CY","CZ","EE","GR","HR","HU","IS","LV","LT","LU","MT","PL","PT","RO","RU","SK","SI","ES","TR", "IE"],
"properties" : {
"AU" : {
"locale" : "en_AU",
"slug" : "en_AU",
"region" : "apac",
"language" : "en",
"paymentType" : "STRIPE",
"formattedDeposit" : "$1,500",