This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flockexper/lock" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"sync" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package k8s | |
import ( | |
"fmt" | |
"os" | |
"text/tabwriter" | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Console.WriteLine(Convert.ToString(1000)); | |
Console.WriteLine(solution(")(")); | |
Console.WriteLine(solution("{[()()]}")); | |
Console.WriteLine(solution("([)()]")); | |
} | |
public static int solution(string S) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultRevision); | |
var browser = await Puppeteer.LaunchAsync(new LaunchOptions | |
{ | |
Headless = true | |
}); | |
var page = await browser.NewPageAsync(); | |
await page.GoToAsync("http://natega.thanwya.emis.gov.eg/"); | |
for (int i = 0; i <= 1000; i++) | |
{ | |
var id = (000000+i).ToString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Accountproto; | |
using Grpc.Core; | |
namespace AccountServiceClient | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"log" | |
"net" | |
"errors" | |
pb "github.com/Ahmad-Magdy/grpc-by-example/proto-go" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
package accountproto; | |
message CreateAccountRequest{ | |
string username = 1; | |
string email = 2; | |
} | |
message CreateAccountResponse{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import crypto from 'crypto'; | |
export const getGravatarFromEmail = (email, size) => { | |
if (!email) return; | |
const hash = crypto.createHash('md5').update(email).digest('hex'); | |
let returnedUrl = `https://www.gravatar.com/avatar/${hash}`; | |
if (!size || size < 1) return returnedUrl; | |
returnedUrl += `?s=${size}`; | |
return returnedUrl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Company = require('./company'); | |
//لتصدير الدالة التي ستحتوي على محتويات ال API كي نستيطع استخدامها فيما بعد | |
module.exports = function(express){ | |
/*انشاء ال router الخاص بنا | |
الذي سيحتوي على المسارات الخاصة بالapi */ | |
var api = express.Router(); | |
//مسار | |
api.route('/company') |