Skip to content

Instantly share code, notes, and snippets.


Razvan Ioan Anastasescu razvanioan

View GitHub Profile
pazdera /
Created Oct 17, 2018
Create a github release for an existing tag from the command line
#!/usr/bin/env bash
rolinger / gist:d6500d65128db95f004041c2b636753a
Last active Dec 4, 2020
PHP => FCM Push notification tutorial for Android and iOS
View gist:d6500d65128db95f004041c2b636753a
Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this
earlier implementation of Googles GCM method: - FCM is the new method and GCM will eventually be
Register your app in the FCM Console: (add project)
1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings.
2. Click on the GEAR settings icon, and then on "Project Settings"
3. In the main screen, click on "Cloud Messaging"
jchandra74 / openssl.MD
Last active Jan 25, 2021
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window
View openssl.MD

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window


My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

wojteklu /
Last active Feb 25, 2021
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

tzmartin /
Last active Feb 22, 2021
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')[OFFICE_FILE_URL]

<iframe src='[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>

OneDrive Embed Links

orottier / RetryTest.php
Last active Nov 18, 2020
Retry function for PHP with exponential backoff
View RetryTest.php
class RetryTest extends TestCase
public function setUp()
// abuse superglobal to keep track of state
$_GET['a'] = 0;
nepsilon /
Last active Feb 22, 2021
How to change your commit messages in Git? — First published in issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

View text effect jquery
<h1>CLASSIC <strong><span class="typewrite" data-period="2000" data-type='[ " COLORFUL"," EXCELLENT"," BEAUTIFUL" ]'>
<span class="wrap"></span>
</span></strong> DRESSES</h1>
ColinMaudry / gist:6fd6a5f610f0ac3e6696
Last active Aug 4, 2020
cURL examples to query Wikidata
View gist:6fd6a5f610f0ac3e6696

SPARQL Queries (with cURL command) on Wikidata

This gist resulted to be just the spark for a proper article, and won't be maintained here anymore.

The SPARQL endpoint is and it has a Web form to fire queries. However ("instance of") tells you what the entity is.

The repository doesn't have named graphs, or at least the SPARQL endpoint rejects graph queries. The classes of entities (rdf:type) are not described in the repository.

To find the HTML page of an entity (such as, simply replace /entity/ with /wiki/.

Vestride /
Last active Feb 23, 2021
Encoding video for the web

Encoding Video


Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus