Skip to content

Instantly share code, notes, and snippets.

View rodrigoferra's full-sized avatar
🏠
Working from home

Rodrigo Ferrari rodrigoferra

🏠
Working from home
View GitHub Profile
@ugurerkan
ugurerkan / zimbra-letsencrypt-renew.md
Last active September 9, 2023 13:19
Zimbra 8.6.0 Letsencrypt SSL renew walkthrough.
@diegonobre
diegonobre / symfony3-rest-api.md
Last active January 5, 2024 14:36 — forked from tjamps/README.md
Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authenticationu
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g. v1.api.example.com)

The API will be written in PHP with the Symfony 3 framework. The following SF2 bundles are used :

@lewg
lewg / block_china_ufw.sh
Created January 18, 2013 15:53
UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
#!/bin/sh
# UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
# Based on http://www.wizcrafts.net/chinese-iptables-blocklist.html
# Cambodia (KH)
ufw deny from 114.134.184.0/21 to any port 22
# Chinese (CN) IP addresses follow:
ufw deny from 1.192.0.0/13 to any port 22
ufw deny from 1.202.0.0/15 to any port 22