Skip to content

Instantly share code, notes, and snippets.

View gghughunishvili's full-sized avatar
💭
I may be slow to respond.

Giorgi Ghughunishvili gghughunishvili

💭
I may be slow to respond.
  • Google
  • New York, NY
  • 04:15 (UTC -04:00)
View GitHub Profile
@gghughunishvili
gghughunishvili / BaseCollection.php
Created November 15, 2020 17:26
Change Laravel pagination structure in API Resources
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\ResourceCollection;
class BaseCollection extends ResourceCollection
{
public function withResponse($request, $response)
{
@gghughunishvili
gghughunishvili / example.md
Last active March 28, 2024 17:10 — forked from sdnts/example.md
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@gghughunishvili
gghughunishvili / gist:41bca7d789e3d159feff4b24f8c17d48
Last active August 12, 2017 11:40
Move one repository into another (merging) without losing history
# Caution: new repo should be empty otherwise you lose new repo data!
git clone --mirror <url_of_old_repo>
cd <name_of_old_repo.git>
git remote add new-origin <url_of_new_repo>
git push new-origin --mirror
# if you want merge two repositories you should use the following commands
@gghughunishvili
gghughunishvili / decorator.php
Created June 12, 2017 08:04 — forked from JeffreyWay/decorator.php
Decorator PHP dummy example
<?php
interface Thing {
public function execute();
}
class A implements Thing {
public function execute()
@gghughunishvili
gghughunishvili / digitalocean-ubuntu.txt
Created June 3, 2017 19:01
All necessary steps for configuring server on digitalocean and preparing for laravel
1) https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
2) https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-14-04
3) install additional packages of php: sudo apt-get install php-mbstring php-zip php-xml
4) https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
@gghughunishvili
gghughunishvili / team-project-management
Last active March 24, 2017 19:58
Team and Project management with github useful links
- https://help.github.com/articles/creating-an-issue-template-for-your-repository/
- https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63#.p4uj9vs26
- https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
@gghughunishvili
gghughunishvili / development-must-have
Last active May 2, 2017 09:48
Useful links for development: API best practices,
REST Api best practices 10
- http://blog.mwaysolutions.com/2014/06/05/10-best-practices-for-better-restful-api/
- http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
@gghughunishvili
gghughunishvili / migrate1.sh
Last active October 14, 2021 09:48 — forked from pepijnblom/migrate.sh
Upgrade MySql on MAMP
# // Upgrade MAMP 3 to Mysql 5.7.12 (on El Capitan Tested)
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.12-osx10.11-x86_64.tar.gz
tar xfvz mysql-5.7.12-osx10.11-x86_64.tar.gz
echo "stopping mamp"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld