Skip to content

Instantly share code, notes, and snippets.

View asaelx's full-sized avatar

Asael Jaimes asaelx

  • Monterrey, México
View GitHub Profile
@huytd
huytd / todo.vim
Created June 14, 2020 07:34
A Todo list syntax in Vim, with an actual checkbox
" Vim syntax file
" Language: Todo
" Maintainer: Huy Tran
" Latest Revision: 14 June 2020
if exists("b:current_syntax")
finish
endif
" Custom conceal
@naveenwashere
naveenwashere / ListMax.java
Created July 4, 2015 13:20
List Max. Hackerrank question for one of the companies.
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
/*
* HACKERRANK INTERVIEW QUESTION
*
* You are given a list of size N, initialized with zeroes. You have to perform M queries on the list and output the
* maximum of final values of all the N elements in the list. For every query, you are given three integers a, b and k and
@protrolium
protrolium / ffmpeg.md
Last active April 8, 2024 11:49
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@imkevinxu
imkevinxu / vidtogif.sh
Last active June 17, 2016 17:35
Convert an animated video to gif from http://chrismessina.me/b/13913393/mov-to-gif
# Convert an animated video to gif
# Works best for videos with low color palettes like Dribbble shots
#
# @param $1 - video file name like `animation.mov`
# @param @optional $2 - resize parameter as widthxheight like `400x300`
#
# Example: vidtogif animation.mov 400x300
# Requirements: ffmpeg and gifsicle. Can be downloaded via homebrew
#
# http://chrismessina.me/b/13913393/mov-to-gif
@mattes
mattes / call
Last active December 29, 2020 09:49
Place a call from terminal using your iPhone (Mac OS X Yosemite & iOS 8)
#!/usr/bin/env sh
open "tel://$*"
@IsraelOrtuno
IsraelOrtuno / CarbonLocale.php
Last active February 14, 2021 23:41
Carbon Locale - Use Carbon diffForHuman in different languages with Laravel Lang class
<?php
/**
- * Carbon diffForHumans multi-language.
- * Inspired in a code made by Meroje (https://gist.github.com/Meroje/7783731)
- * This code has been improved as in that original version was only showing
- * past date differences. Not it's able to show differences in past and future.
- *
- * Use it this way:
- *