This file contains 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
import java.text.SimpleDateFormat | |
import java.util.* | |
/** | |
* Pattern: yyyy-MM-dd HH:mm:ss | |
*/ | |
fun Date.formatToServerDateTimeDefaults(): String{ | |
val sdf= SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()) | |
return sdf.format(this) | |
} |
The script's managers are Greasemonkey or Tampermonkey. Just add it to your browser.
The script's hosting gist.github.com. Just click it.
The script use Google Fonts Hosting. Use a font name from there.
This file contains 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
#!/usr/bin/env python | |
try: | |
# For Python 3.0 and later | |
from urllib.request import urlopen | |
except ImportError: | |
# Fall back to Python 2's urllib2 | |
from urllib2 import urlopen | |
import json |
This file contains 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
# the instructions from here: https://stackoverflow.com/questions/3704919/installing-rmagick-on-ubuntu/31089915#31089915 | |
# worked, but only after I added in line 8 | |
sudo apt-get purge graphicsmagick graphicsmagick-dbg imagemagick-common imagemagick imagemagick-6.q16 libmagickcore-6-headers libmagickwand-dev graphicsmagick-libmagick-dev-compat | |
sudo apt-get autoremove | |
sudo apt-get install imagemagick libmagickwand-dev | |
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config | |
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig | |
gem install rmagick |
Example from Android Jetpack: LiveData
MutableLiveData Example |
---|
For Lumen (5.0.8) (Laravel Components 5.0.*)
Use Case: Deploying Lumen App to Shared Hoster such that it can be called via domain.tld/lumenapp/...
- Rename
public
to desired name (new root folder, for examplelumenapp
) - Move everything else into a new folder, named e.g.
project_src
This file contains 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
#/themes/e_shop/views/custom_field/_my_slider.html.erb | |
<div class="group-input-fields-content" data-callback-render="render_my_custom_slider"> | |
<div class="form-group"> | |
<label>Image:</label> | |
<div class="input-group"> | |
<input data-dimension="<%= field.options[:dimension] %>" data-versions="<%= field.options[:versions] %>" data-thumb_size="<%= field.options[:thumb_size] %>" type="url" name="<%= field_name %>[<%= field.slug %>][values][][image]" class="data-error-place-parent image_field form-control <%= "required" if field.options[:required].to_s.to_bool %>"/> | |
<span class="input-group-addon btn_upload" onclick="load_upload_image_field($(this).prev());"><i class="fa fa-upload"></i> <%= t('camaleon_cms.admin.button.upload_image')%> <%= "(#{field.get_option('dimension')})" if field.get_option('dimension').present? %></span> | |
</div> | |
</div> | |
<div class="clearfix"> |
NewerOlder