Skip to content

Instantly share code, notes, and snippets.

View omidnasri's full-sized avatar
🏢
PTFCH

Omid Nasri omidnasri

🏢
PTFCH
View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 1, 2024 17:49
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@Hameds
Hameds / ReplaceYeKe.sql
Last active April 23, 2024 08:23
Replace Arabic ي & ك in SQL Server Database with Persian characters
use [DATABASE_NAME];
DECLARE @Table NVARCHAR(MAX)
DECLARE @Col NVARCHAR(MAX)
DECLARE Table_Cursor CURSOR
FOR
--پيدا کردن تمام فيلدهاي متني تمام جداول ديتابيس جاري
SELECT a.name, --table
b.name --col
FROM sysobjects a,
syscolumns b
@yeganemehr
yeganemehr / iran-provinces-coordinates.json
Created August 30, 2016 22:01
Coordinates provinces of Iran
{
"@copyright" : "https://fa.wikipedia.org/wiki/%D9%85%D8%AE%D8%AA%D8%B5%D8%A7%D8%AA_%D9%85%D8%B1%DA%A9%D8%B2_%D8%A7%D8%B3%D8%AA%D8%A7%D9%86%E2%80%8C%D9%87%D8%A7%DB%8C_%D8%A7%DB%8C%D8%B1%D8%A7%D9%86",
"East Azerbaijan": {
"Lat": 38.052468,
"Lng": 46.284993
},
"West Azerbaijan": {
"Lat": 37.529607,
"Lng": 45.046549
},
@jogleasonjr
jogleasonjr / SlackClient.cs
Last active October 20, 2023 15:54
A simple C# class to post messages to a Slack channel. You must have the Incoming WebHooks Integration enabled. This class uses the Newtonsoft Json.NET serializer available via NuGet. Scroll down for an example test method and a LinqPad snippet. Enjoy!
using Newtonsoft.Json;
using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
//A simple C# class to post messages to a Slack channel
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet
public class SlackClient
{
@azat-co
azat-co / jquery-api.md
Last active November 2, 2022 19:33
The list of most commonly used jQuery API functions

Here is the list of most commonly used jQuery API functions:

  • find(): Selects elements based on the provided selector string
  • hide(): Hides an element if it was visible
  • show(): Shows an element if it was hidden
  • html(): Gets or sets an inner HTML of an element
  • append() Injects an element into the DOM after the selected element
  • prepend() Injects an element into the DOM before the selected element
  • on(): Attaches an event listener to an element
  • off() Detaches an event listener from an element
@eternnoir
eternnoir / gist:9777420
Last active May 3, 2022 05:25
Ftp Client With C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net;
namespace Lib.Common
{
public class FtpClient
@HereChen
HereChen / convert-image-to-base64.js
Last active March 29, 2022 11:31
convert image to base64
/**
* version1: convert online image
* @param {String} url
* @param {Function} callback
* @param {String} [outputFormat='image/png']
* @author HaNdTriX
* @example
convertImgToBase64('http://goo.gl/AOxHAL', function(base64Img){
console.log('IMAGE:',base64Img);
})
@fordnox
fordnox / check-ftp.php
Created April 5, 2017 13:17
Check ftp connection with PHP
<?php
$host = 'example.com';
$password = 'pass';
$username = 'username';
try {
$result = checkFtp($host, $username, $password);
} catch(Exception $e) {
$result = $e->getMessage();
}