Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
b || !b

Rodrigo Ferrari rodrigoferra

💭
b || !b
View GitHub Profile
@ugurerkan
ugurerkan / zimbra-letsencrypt-renew.md
Last active Aug 1, 2021
Zimbra 8.6.0 Letsencrypt SSL renew walkthrough.
View zimbra-letsencrypt-renew.md
@diegonobre
diegonobre / symfony3-rest-api.md
Last active Oct 7, 2021 — forked from tjamps/README.md
Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle
View symfony3-rest-api.md

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 Jan 18, 2013
UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
View block_china_ufw.sh
#!/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