Skip to content

Instantly share code, notes, and snippets.

View fran-diaz's full-sized avatar
🎯
Focusing

Fran Díaz fran-diaz

🎯
Focusing
View GitHub Profile
@fran-diaz
fran-diaz / compile-php.cmd
Created March 29, 2022 05:35 — forked from mlocati/compile-php.cmd
Script to compile PHP
@echo off
setlocal enabledelayedexpansion
rem Reference: https://wiki.php.net/internals/windows/stepbystepbuild
set MY_VSDIR=C:\Path\To\Microsoft Visual Studio 14.0
set PATH=%SystemRoot%\System32
echo # Compiling PHP
@origamid
origamid / html2img.html
Created March 27, 2020 17:36
html 2 canvas 2 image download
<div class="capture" contenteditable>
<p>Capture with right click</p>
</div>
<script src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
<script>
const elementToSave = document.querySelector(".capture");
// Download with right click
document.addEventListener("contextmenu", () => {
html2canvas(elementToSave).then(canvas => {
@Pulimet
Pulimet / AdbCommands
Last active December 8, 2025 11:04
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@mlocati
mlocati / compile-php.cmd
Created October 7, 2016 08:10
Script to compile PHP
@echo off
setlocal enabledelayedexpansion
rem Reference: https://wiki.php.net/internals/windows/stepbystepbuild
set MY_VSDIR=C:\Path\To\Microsoft Visual Studio 14.0
set PATH=%SystemRoot%\System32
echo # Compiling PHP
@robjens
robjens / animOnScroll.js
Created July 24, 2016 14:20
Codrops animate on scroll script
/**
* animOnScroll.js v1.0.0
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2013, Codrops
* http://www.codrops.com
*/
@mlocati
mlocati / win10colors.cmd
Last active October 11, 2025 05:29
ANSI Colors in standard Windows 10 shell
@echo off
setlocal
call :setESC
cls
echo %ESC%[101;93m STYLES %ESC%[0m
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m
@hal0gen
hal0gen / _mobile-ready-web-app.html
Last active September 21, 2025 11:37 — forked from tfausak/ios-8-web-app.html
iOS + Android settings for web applications
<!doctype html>
<!-- Adapted from https://gist.github.com/tfausak/2222823 -->
<html>
<head>
<title>Mobile-ready web app</title>
<!-- CONFIGURATION -->
@fran-diaz
fran-diaz / material_design_colors.css
Last active August 29, 2015 14:09
Material Design Color Classes for CSS, usefull to play with material design color scheme in your projects.
/**
* Material Design Color Classes for CSS, usefull to play with material design color scheme in your projects.
*
* @author Fran Díaz <fran.diaz.gonzalez@gmail.com>
* @github https://github.com/fran-diaz
*/
/* Text colors: */
.red {color:#f44336}
.red50 {color:#ffebee}
@fran-diaz
fran-diaz / material_design_colors.php
Last active November 4, 2021 08:16
Material Design Colors for PHP, usefull to play with material design color scheme in your projects.
<?php
/**
* Material Design Colors for PHP, usefull to play with material design color scheme in your projects.
*
* @author Fran Díaz <fran.diaz.gonzalez@gmail.com>
* @github https://github.com/fran-diaz
*/
$material_design_colors = array(
'red' => array(
@VladaHejda
VladaHejda / Phpunit-assert_exception.php
Last active December 28, 2022 03:59
Phpunit Exception assertion. For easy multiple testing if Exception is thrown in one test method. For PHP >= 5.5 you can use package with trait: https://packagist.org/packages/vladahejda/phpunit-assert-exception
<?php
abstract class TestCase extends \PHPUnit_Framework_TestCase
{
protected function assertException(callable $callback, $expectedException = 'Exception', $expectedCode = null, $expectedMessage = null)
{
$expectedException = ltrim((string) $expectedException, '\\');
if (!class_exists($expectedException) && !interface_exists($expectedException)) {
$this->fail(sprintf('An exception of type "%s" does not exist.', $expectedException));
}