Skip to content

Instantly share code, notes, and snippets.

View iKlsR's full-sized avatar
😲
daemon.

iKlsR

😲
daemon.
View GitHub Profile
@iKlsR
iKlsR / SketchSystems.spec
Created August 27, 2025 18:17
# Package Status Flow
# Package Status Flow
READY
VALIDATE_ADDRESS -> IN_TRANSIT
ADDRESS_INVALID -> INVALID_ADDRESS
SKIP_DELIVERY -> SKIPPED
INVALID_ADDRESS
FIX_ADDRESS -> READY
SKIP_DELIVERY -> SKIPPED
@iKlsR
iKlsR / SketchSystems.spec
Created August 27, 2025 18:14
# Trip Status Flow
# Trip Status Flow
PENDING
CONFIRM -> CONFIRMED
CANCEL -> CANCELLED
CONFIRMED
START_TRIP -> IN_PROGRESS
CANCEL -> CANCELLED
@iKlsR
iKlsR / fix-git-line-endings
Created November 9, 2020 17:03 — forked from ajdruff/fix-git-line-endings
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@iKlsR
iKlsR / Laravel-Scheduler-Windows.md
Created January 15, 2020 19:32 — forked from Splode/Laravel-Scheduler-Windows.md
Laravel Scheduler on Windows

Run Laravel Scheduled Tasks on Windows

The following are instructions for running scheduled tasks defined in a Laravel project on Windows. The Laravel documentation provides instructions for running scheduled tasks using cron jobs on Linux systems. However, cron jobs are not available on Windows. The built-in Windows Task Scheduler can be used to run scheduled tasks instead.

Create a Scheduled Task

  1. Open Task Scheduler
  2. Select Create Task...
  3. Give the task a name and description
  4. To run the task in the background, select Run whether the user is logged on or not and check the Hidden checkbox.
@iKlsR
iKlsR / redis.php
Created June 16, 2019 11:20 — forked from wuliupo/redis.php
php-redis-on-windows
<?php
$host = 'test.kvstore.aliyuncs.com';
$port = 6379;
$user = 'username';
$pwd = 'password1234';
$key = 'the_stored_key';
$redis = new Redis();
if ($redis->connect($host, $port) == false) {
die($redis->getLastError());
@iKlsR
iKlsR / main.cpp
Created May 2, 2019 18:48 — forked from alexesDev/main.cpp
Redux c++ implementation
#include <mapbox/variant.hpp>
#include <redux.hpp>
struct Increment
{
};
struct Decrement
{
};
@iKlsR
iKlsR / vue.md
Created March 18, 2019 07:33 — forked from DawidMyslak/vue.md
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modyfing state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assing() (or spread operator).

Example below explains implications for different implementations.

@iKlsR
iKlsR / helper.py
Last active July 25, 2018 23:36
pygame boilerplate..
import pygame
import os, sys
width, height = 400, 400
os.environ['SDL_VIDEO_CENTERED'] = '1'
screen = pygame.display.set_mode((width, height))
class Core(object):
def __init__(self, surface, name):
pygame.display.set_caption(name)
// units setup, doesn't matter eventually
var originalUnit = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;
// create a new document (size doesn't matter)
var docRef = app.documents.add(128, 128);
// get the current layer (background)
var topLayer = app.activeDocument.layers[0];
app.activeDocument.activeLayer = topLayer;
// rename/unlock it as it is locked by default
app.activeDocument.activeLayer.name = 'Unlocked';
@iKlsR
iKlsR / _.md
Created June 8, 2013 04:37
test_001