Skip to content

Instantly share code, notes, and snippets.

View molcik's full-sized avatar
👀
WIP

Filip Molcik molcik

👀
WIP
View GitHub Profile
@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
@molcik
molcik / free-illustrator.md
Last active July 30, 2026 03:54
Illustrator never ending trial period

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 /Applications/Adobe Illustrator CC 2018/Support Files/AMT/AI/AMT. You can navigate there with this command:

cd /Applications/Adobe\ Illustrator\ */Support\ Files/AMT/AI/AMT

Then you have to open the file and edit it. You can use just nano editor in terminal.

var Api = function() {
var url = 'https://query.yahooapis.com/v1/public/yql';
var query = 'env "store://datatables.org/alltableswithkeys"; select * from yahoo.finance.historicaldata where symbol = "AAPL" and startDate = "2016-01-01" and endDate = "2017-01-01"';
var def = new $.Deferred();
this.getData = function() {
$.ajax({
'url': url,
'data': {
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 / free-sketch-never-ending.md
Last active February 7, 2020 21:23
Modify Sketch 49 and above to never ending trial

How does it work

All you have to do, to extend your trial period, is go to Date & Time preferences and set date before you trial period has started. Then open your Sketch.app and set your time back to atomatic.

But this can be really annoying do it over and over. And you can do it from your terminal too! All you need is date command. To set specific date you it with date parameter in following format +%m%d%H%M%y (MonthDayHourMinuteYear).

sudo date 0102030405

So command above will set your Date & Time to Sun Jan 2 03:04:00 +07 2005. Now when you open Sketch.app everything should appear as trial has not expired yet. But you don’t want to have your computer with wrong date & time. So to set it back you can use following command, which will set your time according to apple time server:

@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 / 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
/**
* SessionStorage for storing string values
*/
export function SessionStorage(
target: Object, // The prototype of the class
decoratedPropertyName: string // The name of the property
) {
// get and set methods
Object.defineProperty(target, decoratedPropertyName, {
/**
* LocalStorage for storing string values
*/
export function LocalStorage(
target: Object, // The prototype of the class
decoratedPropertyName: string // The name of the property
) {
// get and set methods
Object.defineProperty(target, decoratedPropertyName, {