- Ubuntu, open a browser and navigate to https://github.com/trufflesuite/ganache/releases
- Download the latest Linux release which will be the *.AppImage file.For example ganache-1.3.0-x86_64.AppImage.
- Once the download is complete, open a new terminal and change into the directory with the *.AppImage file.
- Use chmod to make the file executable: chmod a+x ganache-1.3.0-x86_64.AppImage
- You will be prompted if you want to integrate the application into your system. For convenience, click Yes. This will allow you to launch Ganache later from Ubuntu Application menu
- Ganache will launch and prompt if you want to enable Google Analytics tracking to help the developers improve the software. Toggle this off if you wish, then click Continue.
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 { DataSource } from 'typeorm'; | |
import { ConfigService } from '@nestjs/config'; | |
import { config } from 'dotenv'; | |
import models from '../../models'; | |
config(); | |
const configService = new ConfigService(); | |
export default new DataSource({ | |
type: 'postgres', |
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 { Webhook, MessageBuilder } from 'discord-webhook-node'; | |
export type IDiscord = { link?: string, title?: string, author?: string, message?: string } | |
async sendToDiscord(payload: IDiscord) { | |
// send to discord | |
const { link, title, author, message } = payload; | |
try { | |
const hook = new Webhook(link); | |
const embed = await new MessageBuilder() |
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 pandas as pd | |
# Load the data from the CSV file into a DataFrame | |
file_path = "data.csv" # Replace with the actual path to your CSV file | |
df = pd.read_csv(file_path) | |
# Get user input for the search criteria | |
search_input = input("Enter the value you want to search for: ") | |
# Filter the DataFrame based on the search criteria |
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 { SetMetadata } from '@nestjs/common'; | |
export interface SelfDecoratorParams { | |
userIDParam: string; | |
allowAdmins?: boolean; | |
} | |
export const Self = (params: SelfDecoratorParams | string) => | |
SetMetadata( | |
'selfParams', |
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 axios from "axios" | |
const COINGGECKO_BASE_URL:string = 'https://api.coingecko.com/api/v3' | |
const VS_CURRENCY: string = "usd" | |
const CURRENCY_IDS:string = "bitcoin,ethereum,ripple,stellar,celo" | |
const ORDER:string = "market_cap_desc" | |
const PERPAGE:number = 100 | |
const PAGE = 1 | |
const SPARKLINE:boolean = false |
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 { Injectable, Logger } from "@nestjs/common"; | |
import axios from "axios"; | |
import { IHttpServices } from "src/core/abstracts/http-services.abstract"; | |
@Injectable() | |
export class AxiosService implements IHttpServices { | |
async get(url: string, config: Record<string, any>) { | |
try { | |
const response = await axios.get(url, config) |
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
/******** | |
* This module will help us decouple alot of functionality like | |
* * sending emails | |
* * sending sms | |
* * sending notification | |
* * tracking users activities | |
* | |
*/ | |
import * as events from "events" |
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
type FilterQuery<T> = { | |
[K in keyof T]?: T[K] | |
}; | |
static async findOne(field: FilterQuery<ITranslation>): Promise<any> { | |
try { | |
const results = await this.builder().where(Object.keys(field)[0], "==", Object.values(field)[0]).get(); | |
if (results.length) { | |
return results[0]; | |
} |
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 { AxiosResponse } from "axios"; | |
import { AxiosConfig } from "../../api"; | |
export interface IRead<T> { | |
getAll(route: string, params?: string): Promise<AxiosResponse<T[]>>; | |
getById(route: string, id: string): Promise<AxiosResponse<T>>; | |
getPaginatedList(route: string, params?: string): Promise<AxiosResponse<T[]>>; | |
} | |
export interface IWrite<T> { |
NewerOlder