This is an old way to Upload an Image from camera or gallery in WebView. It was made a long time ago and is not maintened anymore. Use it at your own risk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Just open xcode and hit: (cmd + shift + k) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getPath (__args__){ | |
| var path = window.location.pathname; | |
| path = path.split("/"); | |
| var newPath = []; | |
| path.forEach(function(element, index, array){ | |
| if(__args__ && __args__.replace){ | |
| var _index = __args__.replace.indexOf(element); | |
| if(_index < 0 && element != ''){ | |
| newPath.push(element); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var _el = $("#my-element"); | |
| //instantiate the thumbowyg for WYSIWYG editor | |
| $(_el).trumbowyg() | |
| .on('tbwinit', function(){ | |
| //when click occurs on element, we give a focus to it | |
| $('.trumbowyg-editor').click(function(){ | |
| $(this).focus(); | |
| }); | |
| //if return key is pressed we add a break line on it | |
| callElementEditable (); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'); | |
| var spritesmith = require('gulp.spritesmith'); | |
| /** | |
| * A seguinte tarefa buscará arquivos com extensão .png no diretório de sprites, dentro de img/ | |
| * É importante dizer que será criado um css contendo as classes para o uso dos sprites. | |
| * O formato da criação das classes é dado pela propriedade cssVarMap juntamente com cssOpts.cssSelector | |
| * Podemos perceber que a classe é formada por .spt-<nome-arquivo> | |
| * Após a criação tanto do sprite quanto do css, eles são movidos para as pastas necessárias. | |
| */ | |
| gulp.task('sprite', function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //php array | |
| $data = array( | |
| array("key1"=>"value"), | |
| array("key2"=>"value 2") | |
| ); | |
| //twig template | |
| {% for value in data %} | |
| {% for key in value|keys %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static function url_slug($string, $slug = false) | |
| { | |
| //$string = strtolower(strip_tags($string)); | |
| // Código ASCII das vogais | |
| $ascii['a'] = range(224, 230); | |
| $ascii['e'] = range(232, 235); | |
| $ascii['i'] = range(236, 239); | |
| $ascii['o'] = array_merge(range(242, 246), array(240, 248)); | |
| $ascii['u'] = range(249, 252); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://google-webfonts-helper.herokuapp.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*************************************/ | |
| .sprites-gulp-mobile(@spritesheet-sprites); | |
| /*************************************/ | |
| .sprite-width-gulp-mobile(@sprite) { | |
| width: extract(@sprite, 5)/2; | |
| } | |
| .sprite-height-gulp-mobile(@sprite) { | |
| height: extract(@sprite, 6)/2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'); | |
| var spritesmith = require('gulp.spritesmith'); | |
| /** | |
| * The task will search for all files with .png extension in directory sprites/ inside img/ | |
| * The class name will be .spt-<file name> | |
| * After created the files are moved to the folders | |
| */ | |
| gulp.task('sprite', function() { | |
| var spriteData = | |
| gulp.src('img/sprites/*.png') |