Skip to content

Instantly share code, notes, and snippets.

Daniel Fernando Lourusso dflourusso

Block or report user

Report or block dflourusso

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@evgen3188
evgen3188 / react-native-pinch-zoom.js
Created Sep 19, 2016
React Native: how to implement pinch to zoom gesture
View react-native-pinch-zoom.js
/** Links:
* - http://stackoverflow.com/questions/36368919/scrollable-image-with-pinch-to-zoom
* - http://blog.lum.pe/gesture-detection-in-react-native-fixing-unexpected-panning/
*
*/
import React, {Component, PropTypes} from 'react';
import { Text, View, PanResponder, Image } from 'react-native';
function calcDistance(x1, y1, x2, y2) {
@dkarlovi
dkarlovi / registry.example.com.conf
Last active May 16, 2019
GitLab's Container Registry (docker) behind Apache 2.4 reverse proxy
View registry.example.com.conf
<VirtualHost *:80>
ServerName registry.example.com
ServerSignature Off
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]
</VirtualHost>
<VirtualHost *:443>
@ghinda
ghinda / object-to-form-data.js
Last active Jan 22, 2020
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
View object-to-form-data.js
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {
View soma.php
<?php
$notas = [
999 => 8,
456 => 3,
789 => 5,
123 => 2,
]; // 8 5 3 2
asort($notas);
@mvriel
mvriel / pre-commit.php
Created May 16, 2011
Pre-commit hook for DocBlox
View pre-commit.php
#!/usr/bin/php
<?php
echo PHP_EOL;
// output a little introduction
echo '>> Starting unit tests' . PHP_EOL;
// get the name for this project; probably the topmost folder name
$projectName = basename(getcwd());
You can’t perform that action at this time.