Skip to content

Instantly share code, notes, and snippets.

View jandrodev's full-sized avatar

jandrodev

View GitHub Profile
@gaquino
gaquino / gist:87bdf0e6e852e445c0489379d3e9732a
Last active April 15, 2024 06:52
MacOS (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools))
If you are facing an error like that on new MacOS version.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
It means that you need to install XCode command line, open a Terminal and run this command:
$ xcode-select --install
Note:
If you want to download and install Command Line tools manually, it can be downloaded from: https://developer.apple.com/download/more/
@jeffochoa
jeffochoa / Response.php
Last active May 22, 2024 04:06
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@javilobo8
javilobo8 / download-file.js
Last active May 27, 2024 21:00
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@parmentf
parmentf / GitCommitEmoji.md
Last active June 28, 2024 10:47
Git Commit message Emoji
@odan
odan / xampp_php7_xdebug.md
Last active June 28, 2024 12:58
Installing Xdebug for XAMPP
@rxaviers
rxaviers / gist:7360908
Last active June 29, 2024 18:36
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@cecilemuller
cecilemuller / gist:1973079
Created March 4, 2012 13:47
Programmatically log out the user in Drupal 6
<?php
global $user;
$tmp = NULL;
session_destroy();
user_module_invoke('logout', $tmp, $user);
$user = drupal_anonymous_user();
?>
@ashfame
ashfame / Correct-way-to-enqueue-scripts-and-style-in-WordPress.php
Created February 27, 2012 13:36
Correct way to enqueue scripts and style in WordPress
<?php
/**
* Register Styles and Scripts
*/
add_action( 'wp_enqueue_scripts', 'ft_scripts_styles' );
function ft_scripts_styles() {