Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
iKlsR / fix-git-line-endings
Created Nov 9, 2020 — forked from ajdruff/fix-git-line-endings
Forces all line endings to LF in your git repo.
View fix-git-line-endings
# Use this with or without the .gitattributes snippet with this Gist
# create a 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

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 / redis.php
Created Jun 16, 2019 — forked from wuliupo/redis.php
View redis.php
$host = '';
$port = 6379;
$user = 'username';
$pwd = 'password1234';
$key = 'the_stored_key';
$redis = new Redis();
if ($redis->connect($host, $port) == false) {
iKlsR / main.cpp
Created May 2, 2019 — forked from alexesDev/main.cpp
Redux c++ implementation
View main.cpp
#include <mapbox/variant.hpp>
#include <redux.hpp>
struct Increment
struct Decrement
iKlsR /
Created Mar 18, 2019 — forked from DawidMyslak/
Vue.js and Vuex - best practices for managing your state

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

Modyfing state object


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 / java_class_launcher.bat
Last active Aug 29, 2015
drag and drop a .class file to execute it or set as the app to open
View java_class_launcher.bat
@echo off
start javaw %~n1
iKlsR /
Created Dec 14, 2014
download all the videos on in mp4 format
import json, urllib2
response = urllib2.urlopen("")
data = json.load(response)
number_of_videos = data.keys()
urls = []
file_names = []
iKlsR /
Last active Aug 29, 2015
Use your 30 free digicel texts from the comfort of your term
import mechanize, sys
class DigiWebTextDT(object):
def __init__(self): = mechanize.Browser()
# might want to change the locale for your region"")
def get_credentials(self):
iKlsR / closeallwithoutsaving.jsx
Created Oct 19, 2014
close all open ps tabs without prompting to save
View closeallwithoutsaving.jsx
function closeCurrentWithoutSaving() {
if (app.activeDocument.length != 0)
function closeAllWithoutSaving() {
while (documents.length != 0) {
for (var i = 0x00; i < documents.length; i++)
iKlsR / Pascal.sublime-build
Created May 2, 2014
Pascal build system for st3
View Pascal.sublime-build
"cmd": ["fpc", "${file}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.pas",
"variants": [
"name": "Run",
"cmd": ["$file_base_name"],