Skip to content

Instantly share code, notes, and snippets.

View intelguasoft's full-sized avatar
👨‍🍳
Working from at Home...

Henry Díaz intelguasoft

👨‍🍳
Working from at Home...
View GitHub Profile
@ShaneShipston
ShaneShipston / php.ini
Created July 23, 2023 16:20
NativePHP Windows Support
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:

It's time to swap out these placeholders on the new Livewire landing page. Show some love!

(Please reply with a brief testimonial, name, and twitter handle)

image

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CoderJava
CoderJava / main.dart
Created May 21, 2021 08:24
Flutter camera preview (full screen)
final mediaSize = MediaQuery.of(context).size;
final scale = 1 / (controller.value.aspectRatio * mediaSize.aspectRatio);
return ClipRect(
clipper: _MediaSizeClipper(mediaSize),
child: Transform.scale(
scale: scale,
alignment: Alignment.topCenter,
child: CameraPreview(controller),
),
);
@tanthammar
tanthammar / session-timeout-alert-after-livewire-scripts.blade.php
Last active November 23, 2023 11:50
Laravel Livewire Turbolinks Blade component to keep session alive
{{-- You do not need to add this component if you are using the permanent option in the head component --}}
<script>
if (!window.sessionTimerPermanent && window.Livewire) {
window.livewire.hook('afterDomUpdate', startSessionTimer)
}
// if you are on livewire > 1.3.1 and want to avoid the default error alert
// https://github.com/livewire/livewire/pull/1146
window.livewire.onError(statusCode => {
if (statusCode === 419) {
@intelguasoft
intelguasoft / package.json
Created February 29, 2020 21:12
Package.json para un proyecto con AdonisJS usando depuración por medio de VSCode
{
"name": "adonis-api-app",
"version": "4.1.0",
"adonis-version": "4.1.0",
"description": "Adonisjs boilerplate for API server with pre-configured JWT",
"main": "index.js",
"scripts": {
"start": "node server.js",
"dev": "adonis serve --dev --debug",
"test": "node ace test"
@intelguasoft
intelguasoft / .prettierrc
Last active March 1, 2020 03:16
Configuración para el complemento (Prettier - Code formatter esbenp.prettier-vscode)
{
"arrowParens": "avoid",
"semi": false,
"singleQuote": true,
"bracketSpacing": true,
"tabWidth": 2
}
@intelguasoft
intelguasoft / .vscode\launch.json
Last active March 1, 2020 03:16
Configuración de depuración en Visual Studio Code para Node.js.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug ecommerce",
@intelguasoft
intelguasoft / gist:aa133c98be77064bcd5601f7b3ffce98
Created February 15, 2020 02:04
How to save a file from js (from tiddlywiki code)
function mozillaSaveFile(filePath,content)
{
if(window.Components) {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(filePath);
if(!file.exists())
file.create(0,0664);
var out = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
var http = require('http');
var path = require('path');
var fs = require('fs');
var AUDIOFILE = "./audio.ogg";
function serveWithRanges(request, response, content) {
var range = request.headers.range;
var total = content.length;
var parts = range.replace(/bytes=/, "").split("-");