Skip to content

Instantly share code, notes, and snippets.

@edilsoncichon
edilsoncichon / Laravel Setup Script for Ubuntu 22.sh
Last active May 5, 2024 11:09 — forked from rolandstarke/laravel setup.sh
Ubuntu 22.04 setup bash script for Laravel 10 (PHP and Nginx)
# Ubuntu 20 LTS Server Setup for Laravel
# Login as root user
sudo su -
# Update list of available packages
apt update
@MrNegativeTW
MrNegativeTW / ImgurApiService.kt
Last active May 5, 2024 11:09
Retrofit 2 Kotlin Example, Imgur upload image example.
package com.your.packagename
import com.txwstudio.app.roadreport.json.imgurupload.ImgurUploadJson
import okhttp3.MultipartBody
import okhttp3.OkHttpClient
import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.Header
import retrofit2.http.Multipart

Transparent Restaurant Backend

In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.

Description

In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:

  • low: the cheapest
  • medium: moderate
@arreche
arreche / bitbucket-pipelines.yml
Last active May 5, 2024 11:00
Run Angular tests in Bitbucket Pipelines
pipelines:
default:
- step:
name: Install, Lint, Test and Build
caches:
- node
script:
- npm install
- npm run lint
- >
@fisadev
fisadev / work
Created December 3, 2015 14:57
A python script to launch my tmux things at once
#!/usr/bin/env python
# coding: utf-8
from os import system
PROJECT_PATH = 'path_to_your_project'
ACTIVATE_VENV = '. path_to_your_virtualenv/bin/activate'
def tmux(command):
@wojteklu
wojteklu / clean_code.md
Last active May 5, 2024 10:53
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@KarishmaGhiya
KarishmaGhiya / WI for Azure Service Connections.md
Last active May 5, 2024 10:52
[Identity] API Design for Azure Service connections Credential in Azure Pipelines

Introduction

Introducing a credential support for federated token authorization on Azure Pipelines in Azure SDK for Identity.

As a user, one should be able to use Azure Services from an Azure Pipeline task without using secrets. The Azure Pipelines provides a workload federation identity support for this through ARM Service Connections. This credential is designed to explicitly support this scenario for Azure Pipelines.

image

Read up on details on how federation identity is enabled for Service Connections - https://devblogs.microsoft.com/devops/public-preview-of-workload-identity-federation-for-azure-pipelines/

//
// ContentView.swift
// AppleMusicLyricsPlayer
//
// Created by Magesh Sridhar on 2/5/23.
//
import SwiftUI
import AVKit
@dinhquochan
dinhquochan / install.sh
Created July 24, 2023 15:39
Install PHP 8.2, Composer, MySQL 8 for Laravel Development on Ubuntu 22.04
## PHP
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2-cli php8.2-dev php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \
php8.2-curl php8.2-imap php8.2-mysql php8.2-mbstring php8.2-xml php8.2-zip \
php8.2-bcmath php8.2-soap php8.2-intl php8.2-readline php8.2-ldap php8.2-msgpack \
php8.2-igbinary php8.2-redis php8.2-memcache php8.2-pcov php8.2-xdebug
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour {
[SerializeField] private Transform mainCamera;
[SerializeField] private float sensitivity;
[SerializeField] private Rigidbody rigidBody;
[SerializeField] private float moveForce;
[SerializeField] private float maxMoveSpeed;