Skip to content

Instantly share code, notes, and snippets.

View csxcode's full-sized avatar

Carlos Silva csxcode

View GitHub Profile
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active July 21, 2024 07:54 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@joseluisq
joseluisq / 1README.md
Last active January 3, 2022 13:22
Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

Lumen 5 HTTP Exception Handlers with JSON support.

Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

image

Setup

Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php and app/Http/Middleware/Authenticate.php

@juanmaguitar
juanmaguitar / callback-promises-generators-async.js
Last active June 20, 2018 10:22
callbacks vs promises vs generators vs async
// https://medium.com/@rdsubhas/es6-from-callbacks-to-promises-to-generators-87f1c0cd8f2e#.q7boouq4o
/* Step 1: Callback hell — N levels deep */
var request = require('request');
var url1='http://httpbin.org/', url2=url1, url3=url1, url4=url1;
function foo(finalCallback) {
request.get(url1, function(err1, res1) {
if (err1) { return finalCallback(err1); }
@bdcravens
bdcravens / add-timestamps.sql
Created December 19, 2012 21:32
SQL Server - add createdAt and updatedAt columns, automatically updates
ALTER TABLE myTable
add createdAt datetime
CONSTRAINT DF_myTable_createdat DEFAULT GETDATE()
ALTER TABLE myTable
add updatedAt datetime
CONSTRAINT DF_myTable_updatedAt DEFAULT GETDATE()
go
@duncansmart
duncansmart / MailgunUtil.cs
Last active October 20, 2022 06:19
C# implementation of "Securing Webhooks" sample code https://documentation.mailgun.com/user_manual.html#webhooks
using System;
using System.Text;
using System.Security.Cryptography;
class MailgunUtil
{
/// <summary>
/// Authenticates incoming requests to a Mailgun webhook (https://documentation.mailgun.com/user_manual.html#webhooks).
/// </summary>
/// <example>