Skip to content

Instantly share code, notes, and snippets.

View mohamedaboelmagd's full-sized avatar
🎯
Focusing

Mohamed Aboelmagd mohamedaboelmagd

🎯
Focusing
View GitHub Profile
@ihorvorotnov
ihorvorotnov / get-social-shares
Last active May 26, 2024 08:13
Get number of shares from social platforms
Facebook*:
https://api.facebook.com/method/links.getStats?urls=%%URL%%&format=json
+ works, returns shares, likes, comments and total
Twitter:
http://urls.api.twitter.com/1/urls/count.json?url=%%URL%%&callback=twttr.receiveCount
+ v1 API but still works
Reddit:
http://buttons.reddit.com/button_info.json?url=%%URL%%
@Chaser324
Chaser324 / GitHub-Forking.md
Last active November 14, 2024 08:32
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@escapedcat
escapedcat / app.js
Created July 28, 2014 10:19
basic webpack angularjs example, based on phonecatApp tutorial (phonecat)
var phonecatAnimations = require("./animations.js");
var phonecatControllers = require("./controllers.js");
var phonecatFilters = require("./filters.js");
var phonecatServices = require("./services.js");
'use strict';
/* App Module */
var phonecatApp = angular.module('phonecatApp', [
@mxriverlynn
mxriverlynn / 1.js
Last active April 15, 2020 14:27
Standard deviation, in JavaScript
var sum = values.reduce(function(sum, value){
return sum + value;
}, 0);
var avg = sum / data.length;
@anvaka
anvaka / 00.Intro.md
Last active November 15, 2024 07:27
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
@Humoud
Humoud / regex-arabic.md
Last active April 1, 2024 03:48
Detecting arabic characters with regex.

Detect all Arabic Characters:

/[\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\uFDF0-\uFDFD]/

Summary:

  Arabic (0600—06FF, 225 characters)

  Arabic Supplement (0750—077F, 48 characters)
@jondejong
jondejong / HttpService.ts
Created June 2, 2016 20:13
Angular 2 HttpService example for URL prefixes and auth headers
@Injectable()
export class HttpService {
private urlRoot:String;
constructor(private _http: Http,
private userService:UserService) {
this.urlRoot = 'https://api.myapp.com';
if(host == 'localhost'){
this.urlRoot = 'http://localhost:4040';
@zenorocha
zenorocha / basic.md
Last active March 26, 2023 09:00
New Firebase Auth vs Old Firebase Auth
@bennadel
bennadel / app.component.ts
Created May 1, 2018 12:42
Creating A Medium-Inspired Text Selection Directive In Angular 5.2.10
// Import the core angular services.
import { Component } from "@angular/core";
// Import the application components and services.
import { TextSelectEvent } from "./text-select.directive";
// ----------------------------------------------------------------------------------- //
// ----------------------------------------------------------------------------------- //
interface SelectionRectangle {
Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4