This package allows CSV based seeds.
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 System.IO; | |
using System.Security.Cryptography; | |
using System.Security.Cryptography.X509Certificates; | |
namespace PublicKeyCryptographyExample | |
{ | |
// | |
// https://yetanotherchris.dev/security/public-private-key-in-netcore-by-example/ | |
// |
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 { Request, Response } from 'express'; | |
import { Body, Controller, Post, Req, Res } from '@nestjs/common'; | |
import { UserService } from './user.service'; | |
import * as Redis from 'ioredis'; | |
import { RateLimiterRedis } from 'rate-limiter-flexible'; | |
const redisClient = new Redis({enableOfflineQueue: false}); | |
const maxWrongAttemptsByIPperDay = 100; | |
const maxConsecutiveFailsByUsernameAndIP = 5; |
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 {Observable, BehaviorSubject} from 'rxjs'; | |
import {_throw} from "rxjs/observable/throw"; | |
import {take, filter, catchError, switchMap, finalize} from 'rxjs/operators'; | |
import {Injectable, Injector} from "@angular/core"; | |
import {HttpInterceptor, HttpRequest, HttpHandler, HttpSentEvent, HttpHeaderResponse, HttpProgressEvent, | |
HttpResponse, HttpUserEvent, HttpErrorResponse} from "@angular/common/http"; | |
import {ResetApiProvider} from "../providers/reset-api/reset-api"; | |
import {Events} from "ionic-angular"; |
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 { NgModule, ErrorHandler } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { HttpModule } from '@angular/http'; | |
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'; | |
import { MyApp } from './app.component'; | |
import { IonicStorageModule } from '@ionic/storage'; | |
import { AboutPage } from '../pages/about/about'; | |
import { ContactPage } from '../pages/contact/contact'; | |
import { HomePage } from '../pages/home/home'; |
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
//For nearby API you can pass actionId or latlng. For more info on nearbyAPI https://docs.hypertrack.com/api/entities/user.html#list-nearby-users | |
public void getNearbyUsers(String actionId, Latlng latlng){ | |
//Create retrofit service object | |
RetrofitService getNearbyUserService = RetrofitServiceGenerator.createService(RetrofitService.class,context); | |
Call<UserListResponse> call = getNearbyUserService.getNearByUsers(actionID,latLng.latitude +","+latLng.longitude); | |
call.enqueue(new Callback<UserListResponse>() { | |
@Override | |
public void onResponse(Call<UserListResponse> call, Response<UserListResponse> response) { | |
if(response.isSuccessful()){ | |
if(response.body() != null){ |
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
//Interface tanımlama | |
public interface UserService { | |
@GET("/users/{username}") | |
UserModel getUser(@Path("username") String name); | |
} | |
//Adapter ve servis oluşturma | |
RestAdapter restAdapter = new RestAdapter.Builder() | |
.setEndpoint("https://api.mustafab.net") | |
.build(); |
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
public clas AsyncImplementation extends AsyncTask<Void, Void, Void> { | |
/*Please read the rest of the explanation in the DefaultImplementation.java file. The difference between a default http request | |
and one using an AsyncTask is the enqeue() or the .execute() method*/ | |
/*If you are passing params to the url, like it would be the case of the method post(long theDynamicParameter) you can | |
do it using replacing the void in the AsyncTask, in this case we are passing a Map so is passed in the constructor. Some times, | |
you would want the AsyncTask solve all the logic, then implements methods here to do it. Create the request http in a loop. | |
Use getter and setter to extends this to another class, etc. | |
Now in activity you can new AsyncImplementation(map).execute();*/ |
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
<?php | |
// I made this array by joining all the following lists + .php extension which is missing in all of them. | |
// please contribute to this list to make it as accurate and complete as possible. | |
// https://gist.github.com/plasticbrain/3887245 | |
// http://pastie.org/5668002 | |
// http://pastebin.com/iuTy6K6d | |
// total: 1223 extensions as of 16 November 2015 | |
$mime_types = array( | |
'3dm' => array('x-world/x-3dmf'), | |
'3dmf' => array('x-world/x-3dmf'), |
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
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Session; | |
use Illuminate\Support\Facades\Redirect; | |
use DB; | |
use Illuminate\Support\Facades\Storage; |
NewerOlder