This are collection of java exercises. It was kinda fun ngl.
/* | |
Author: Jonathan Lurie - http://me.jonathanlurie.fr | |
License: MIT | |
The point of this little gist is to fix the issue of losing | |
typed arrays when calling the default JSON serilization. | |
The default mode has for effect to convert typed arrays into | |
object like that: {0: 0.1, 1: 0.2, 2: 0.3} what used to be | |
Float32Array([0.1, 0.2, 0.3]) and once it takes the shape of an | |
object, there is no way to get it back in an automated way! |
First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)
$ git checkout master
Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master
FFmpeg is a free and open source command line tool for transcoding multimedia files. It contains a set of shared audio and video libraries such as: libavcodec, libavformat, and libavutil. With this tool, you can convert between various video and audio formats, set sample rates and resize videos.
In this document will show you how to install a stable version and the latest version of FFmpeg. This instructions apply for any Ubuntu based distribution, including Linux Mint and Elementary OS.
In order to be able to add new repositories and install packages on your Ubuntu system, you must be logged in as a user with sudo
privileges.
import loadScript from 'load-script'; | |
let initialized = false; | |
let queue = []; | |
export function fb(callback) { | |
if if (initialized) { | |
callback(window.FB); | |
} else { | |
queue.push(callback); |
source: https://mirrors.edge.kernel.org/pub/software/scm/git/docs/howto/revert-a-faulty-merge.txt | |
stackoverflow: https://stackoverflow.com/questions/1078146/re-doing-a-reverted-merge-in-git | |
Date: Fri, 19 Dec 2008 00:45:19 -0800 | |
From: Linus Torvalds <torvalds@linux-foundation.org>, Junio C Hamano <gitster@pobox.com> | |
Subject: Re: Odd merge behaviour involving reverts | |
Abstract: Sometimes a branch that was already merged to the mainline | |
is later found to be faulty. Linus and Junio give guidance on | |
recovering from such a premature merge and continuing development | |
after the offending branch is fixed. |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE application/json | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype | |
AddOutputFilterByType DEFLATE application/x-font-ttf |
<?php | |
function convert($size) | |
{ | |
$unit=array('b','kb','mb','gb','tb','pb'); | |
return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i]; | |
} | |
convert(memory_get_usage()); |
- Имена полей в ответе задавать в
snake_case
(prr_page
,created_at
,system_name
,...) - Для времени использовать
ISO 8601
(формат: YYYY-MM-DDTHH:MM:SSZ) - Отдавать данные (сам контент, поля сущностей, массивы сущностей), помещая их в
data
- GET: /api/users — получить список пользователей;
- GET: /api/users/123 — получить указанного пользователя;
- POST: /api/users — создать нового пользователя;
<?php | |
namespace Tests; | |
use Mail; | |
use Swift_Message; | |
use Swift_Events_EventListener; | |
trait MailTracking | |
{ | |
/** | |
* Delivered emails. |