Skip to content

Instantly share code, notes, and snippets.

View molcik's full-sized avatar
👀
WIP

Filip Molcik molcik

👀
WIP
View GitHub Profile
struct NavigationBarModifier: ViewModifier {
var backgroundColor: UIColor?
init( backgroundColor: UIColor?) {
self.backgroundColor = backgroundColor
let coloredAppearance = UINavigationBarAppearance()
coloredAppearance.configureWithTransparentBackground()
coloredAppearance.backgroundColor = .clear
coloredAppearance.titleTextAttributes = [.foregroundColor: UIColor.white]
@molcik
molcik / test.php
Last active October 6, 2018 02:53
Getty Images API SDK - PHP
<?php
require __DIR__.'/vendor/autoload.php'; // <--- Notice this line, it's missing in example file
// include __DIR__.'/build/GettyImagesApi.phar'; // <--- Uncaught DI\Definition\Exception\DefinitionException: Entry "ICurler" cannot be resolved
include __DIR__.'/src/GettyImages_Client.php';
use GettyImages\Api\GettyImages_Client;
$apiKey = "superSecretApiKey";
$apiSecret = "superSecretApiSecret";
@molcik
molcik / angular-local-storage.md
Last active July 13, 2018 14:16
Local Storage and Session Storage in Angular

Elegant way how to use Local Storage in Angular app are decorators. So you just decorate your variable with @localStorage or @SessionStorage.

Usage

export class SomeComponent {

  /** Attributes */
 @LocalStorage
@molcik
molcik / plugin.xml
Last active July 5, 2018 08:24
Cordova Android Plugin
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="com.filipmolcik.plugin.example"
version="1.0.0">
<name>filipmolcik-push-notifications</name>
<description>subscribe for push notifications</description>
<license>null</license>
<js-module src="www/Example.js" name="Example">
<clobbers target="Example" />
</js-module>
@molcik
molcik / package.json
Last active July 5, 2018 08:06
Cordova Example Plugin package.json
{
"name": "com.filipmolcik.plugin.example",
"version": "1.0.0",
"description": "Example plugin to demonstrate how to call android function from javascript.",
"cordova": {
"id": "com.filipmolcik.plugin.example",
"platforms": [
"android"
]
},
@molcik
molcik / index.js
Created July 5, 2018 07:58
Calling Cordova Android Funtion from Javascript
cordova.exec(function(success) {}, //success callback
function(error) {}, //error callback
"Example", //class name
"YOUR_ACTION_NAME_PARAMETER", //action name
["Dog", "Pig", 42, false]); //args
@molcik
molcik / Example.java
Last active July 5, 2018 08:17
Cordova Example Android Plugin
package com.filipmolcik.plugin; // This must match with the plugin.xml and package.json
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.json.JSONArray;
import org.json.JSONException;
// Example is the 3rd parameter in javascript part
public class Example extends CordovaPlugin {
@Override // action is the 4th parameter, args is the array from 5th parameter in javascript part
@molcik
molcik / best-web-hosting-services-2018.md
Created June 19, 2018 02:51
Best Web Hosting Services 2018

How did we measure the quality

Here’s what the process of measurment in order to find out web hosting parametrs:

Loadtime

  1. Set up blank (WordPress) website.
  2. Use https://tools.pingdom.com/ so the results are consistent.

Uptime

Data from provider.

@molcik
molcik / socialmediatools-socialbakers.csv
Last active June 10, 2018 06:03
Srovnání nástrojů pro správu sociálních sítí - SocialBakers
Free Professional Plan Business Plan Enterprise Plan
cena 14dní $20/profil/měsíc na vyžádání na vyžáddání
historie 1 měsíc 6 mesíců 12 měsíců neomezena
uživatelské účty 1 5 20 20+
počet profilů 5 5-20 20+ 20+
@molcik
molcik / free-photoshop.md
Created May 18, 2018 08:39
Modify Photoshop to never ending trial

How Does It Work

All you have to do, to extend your trial period, is change number in TrialKey element in application.xml. This file is located in /Library/Application Support/Adobe/Adobe Photoshop/AMT. You can navigate there with this command:

cd /Library/Application\ Support/Adobe/Adobe\ Photoshop\ */AMT

Then you have to open the file and edit it. You can use just TextEdit app.

open -a TextEdit application.xml