Skip to content

Instantly share code, notes, and snippets.

View molcik's full-sized avatar
👀
Status: In Progress

Filip Molcik molcik

👀
Status: In Progress
View GitHub Profile
@molcik
molcik / free-illustrator.md
Last active May 8, 2024 14:30
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.

@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 / app.module.ts
Created November 18, 2017 11:48
Angular Google Analytics App Module Setup
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { environment } from '../environments/environment';
import { AppComponent } from './app.component';
import {GoogleAnalyticsService} from "./services/google-analytics.service";
@NgModule({
declarations: [
AppComponent
]
@molcik
molcik / google-analytics.service.ts
Last active November 18, 2017 11:40
Google Analytics Angular 2 Service
import { Injectable } from '@angular/core';
import {Router, NavigationEnd} from '@angular/router';
import { environment } from '../../environments/environment';
declare var ga:Function; // <-- Here we declare GA variable
@Injectable()
export class GoogleAnalyticsService {
constructor(router: Router) {
if (!environment.production) return; // <-- If you want to enable GA only in production
@molcik
molcik / index.html
Created November 18, 2017 11:35
Google Analytics Angular 2 Index
<!doctype html>
<head>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXXX-X', 'auto');
</script>
</head>
<body>
<app-root></app-root>
</body>
<mat-grid-list cols="4" rowHeight="100px">
<mat-grid-tile
*ngFor="let tile of tiles"
[colspan]="tile.cols"
[rowspan]="tile.rows"
[style.background]="tile.color">
{{tile.text}}
</mat-grid-tile>
</mat-grid-list>
import {Component} from '@angular/core';
@Component({
selector: 'material-app',
templateUrl: 'app.component.html'
})
export class AppComponent {
tiles = [
{text: 'One', cols: 2, rows: 1, color: '#142A5C'},
{text: 'Two', cols: 1, rows: 1, color: '#B7A0E8'},
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import { MatGridListModule, MatToolbarModule } from '@angular/material'; // <----- HERE
import {AppComponent} from './app.component';
@NgModule({
imports: [
BrowserModule,
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {NgModule, LOCALE_ID} from '@angular/core';
import {CommonModule} from '@angular/common';
import {
MdDatepickerModule,
MdIconModule,
MdInputModule,
MdToolbarModule,
MdNativeDateModule,