Skip to content

Instantly share code, notes, and snippets.

View 5-digits's full-sized avatar
🏠
Working from home

Houssem Cherif 5-digits

🏠
Working from home
  • France
View GitHub Profile
<!-- Approve modal X -->
<div class="modal fade" id="modalX" tabindex="-1" role="dialog" style="display: none;" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered width-modal" role="document">
<div class="modal-content">
<form type="POST" id="#" method="#">
<input type="hidden" id="selected_form" value="" data-hash="0"/>
<input type="hidden" id="section_name" value=""/>
<div class="modal-header">
<div class="title-modal"> Confirm this X</div>
<button type="button" class="close close-btn-padding" data-dismiss="modal" aria-label="Close">
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
Open Project structure - Ctrl + Shift + Alt + S
Find only classes - CMD + O
Find files - CMD + Shift + O
Find everything - Double Shift
Find symbol - CMD + Alt + O
Find in page - CMD + f
Find usages - fn + Alt + f7
Generate boilerplate code - CMD + J
Quick fix - Alt+ Enter
Code completion - Ctrl + Space
@5-digits
5-digits / install.php
Created June 27, 2017 16:01 — forked from tschoffelen/install.php
A simple PHP script that automatically downloads and unzips the latest version of Wordpress in the current directory (./), so that I don't have to download it and upload it to my server through FTP manually.
<?php
echo '<pre>';
echo '<span style="color:blue">DOWNLOADING...</span>'.PHP_EOL;
// Download file
file_put_contents('wp.zip', file_get_contents('http://wordpress.org/latest.zip'));
$zip = new ZipArchive();
$res = $zip->open('wp.zip');
if ($res === TRUE) {
@5-digits
5-digits / README.md
Created May 5, 2017 08:25 — forked from tjamps/README.md
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 2 + 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 authentication
  • 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 2 framework. The following SF2 bundles are used :

@5-digits
5-digits / gist:8ddc9ebd64162319ae4b0f1cbe6a792a
Created November 9, 2016 14:19 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array