This file contains hidden or 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 System.Collections.Generic; | |
| using System.Linq; | |
| /// <summary> | |
| /// Response Model | |
| /// </summary> | |
| public class ResponseModel<T> | |
| { | |
| /// <summary> |
This file contains hidden or 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 Polly; | |
| using RestSharp; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Net; | |
| using System.Text.Encodings.Web; | |
| using System.Text.Json; | |
| using System.Threading.Tasks; | |
| namespace RestSharpWithPolly |
This file contains hidden or 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.Threading.Tasks; | |
| using MongoDB.Bson; | |
| using MongoDB.Bson.Serialization; | |
| using MongoDB.Bson.Serialization.Serializers; | |
| using MongoDB.Driver; | |
| namespace VS.Services | |
| { | |
| public class MongoDBService | |
| { |
This file contains hidden or 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.IO; | |
| using System.Collections.Generic; | |
| using System.Runtime.Serialization.Formatters.Binary; | |
| using System.Linq; | |
| namespace Vasconcellos.Extensions | |
| { | |
| public static class ObjectExtension | |
| { | |
| /// <summary> |
This file contains hidden or 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
| function download(content, fileName, contentType) { | |
| var a = document.createElement("a"); | |
| var file = new Blob([content], {type: contentType}); | |
| a.href = URL.createObjectURL(file); | |
| a.download = fileName; | |
| a.click(); | |
| } | |
| function getInstagramsIFollow(amount) { | |
| let instagrams = ''; |
This file contains hidden or 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
| function timer(ms) { return new Promise(res => setTimeout(res, ms)); } | |
| async function FollowInstagramUsers(amount) { | |
| for (var i = 0; i <= amount; i++) { | |
| document.getElementsByClassName("sqdOP L3NKy y3zKF ")[i].click(); | |
| console.log(i); | |
| await timer(5000); | |
| } | |
| } | |
| function wait(ms) { |
This file contains hidden or 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
| private static T DeepCopy<T>(T other) | |
| { | |
| using (MemoryStream ms = new MemoryStream()) | |
| { | |
| BinaryFormatter formatter = new BinaryFormatter(); | |
| formatter.Context = new StreamingContext(StreamingContextStates.Clone); | |
| formatter.Serialize(ms, other); | |
| ms.Position = 0; | |
| return (T)formatter.Deserialize(ms); |
This file contains hidden or 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
| function b64EncodeUnicode(str) { | |
| // first we use encodeURIComponent to get percent-encoded UTF-8, | |
| // then we convert the percent encodings into raw bytes which | |
| // can be fed into btoa. | |
| return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, | |
| function toSolidBytes(match, p1) { | |
| return String.fromCharCode('0x' + p1); | |
| })); | |
| } |
This file contains hidden or 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 System.ComponentModel; | |
| using System.Linq; | |
| using System.Reflection; | |
| public static class EnumExtension | |
| { | |
| public static string GetDescription<TEnum>(this TEnum value) where TEnum : Enum | |
| { | |
| FieldInfo fieldInfo = value.GetType().GetField(value.ToString()); |
This file contains hidden or 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 System.Collections; | |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| using System.Text.Encodings.Web; | |
| using System.Text.Json; | |
| using System.Text.Json.Serialization; | |
| using Microsoft.Extensions.Logging; | |
| namespace Vasconcellos.Log |