Skip to content

Instantly share code, notes, and snippets.

View OzanKurt's full-sized avatar
🍻
Cheers!

Ozan Kurt OzanKurt

🍻
Cheers!
View GitHub Profile
@dinhchi27
dinhchi27 / Key Sublime Text 3.2.1 Build 3207 - Sublime Text 3 License Key
Last active April 24, 2024 23:37
Key Sublime Text 3.2.1 Build 3207 - Sublime Text 3 License Key
Key Sublime Text 3.2.1 Build 3207
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
@OrionUnix
OrionUnix / Sublime Text 3.2.2 Build 3211 key licence
Last active April 17, 2024 13:58
Sublime Text 3.2.2 Build 3211 key licence
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
@irazasyed
irazasyed / weight-utility.php
Created January 8, 2016 09:21
PHP: Utility function for getting random values with weighting.
<?php
/**
* getRandomWeightedElement()
* Utility function for getting random values with weighting.
* Pass in an associative array, such as array('A'=>5, 'B'=>45, 'C'=>50)
* An array like this means that "A" has a 5% chance of being selected, "B" 45%, and "C" 50%.
* The return value is the array key, A, B, or C in this case. Note that the values assigned
* do not have to be percentages. The values are simply relative to each other. If one value
* weight was 2, and the other weight of 1, the value with the weight of 2 has about a 66%
* chance of being selected. Also note that weights should be integers.
@awebartisan
awebartisan / dynamic_input_fields.html
Created March 1, 2021 09:29
Dynamic input fields with Alpine.js
<div x-data="{ bankAccounts: [{
id: '',
accountNumber: ''
}] }">
<template x-for="(bankAccount, index, bankAccounts) in bankAccounts" :key="index">
<div class="grid grid-cols-6 gap-6 mt-2">
<div class="col-span-3 md:col-span-3 sm:col-span-2">
<x-jet-label for="city">Bank</x-jet-label>
<select :name="`bank_info[${index}][bank_id]`" id="bank"
class="border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm mt-1 block w-full">
<?
//
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio)
//
// File: twitterFollowerCuratorBot.php
//
// Created: May 2021
// License: MIT
//
@OzanKurt
OzanKurt / arr_dot.js
Created December 8, 2020 00:51
Laravel's Arr::dot function for Javascript.
/**
* Laravel's Arr::dot function for Javascript.
* IMPORTANT: Requires lodash installed.
*/
function dot(array, prepend) {
results = []
prepend = prepend || ''
$.each(array, function(key, value) {
if ((_.isObject(value) || _.isArray(value)) && ! _.isEmpty(value)) {
@jeffochoa
jeffochoa / event.js
Last active April 13, 2023 19:55
VueJs global event dispatcher
class Event {
constructor() {
this.vue = new Vue();
}
fire(event, data = null) {
this.vue.$emit(event, data);
}
listen(event, callback) {
@seriallos
seriallos / shrouded-buffs.simc
Last active October 13, 2022 08:49
WoW M+ Shrouded Buff Sim Input
# PASTE IN YOUR /SIMC INPUT AFTER THIS LINE
# Run this in Raidbots Advanced mode: https://www.raidbots.com/simbot/advanced
#
# Or using a recent nightly build of SimC: https://www.simulationcraft.org/download.html
#
# The lines below test out 5, 10, 15, and 20 stacks of each Bounty buff to give a sense of what
# will provide the most DPS.
@gnanet
gnanet / save-last-bootstrap-tabs.js
Created August 24, 2016 21:20 — forked from vlepeule/save-last-bootstrap-tabs.js
Save last bootstrap tabs in localStorage
(function () {
// Simply add a data-save-tabs to your tablist e.g. <ul role="tablist" data-save-tabs="your-custom-slug">
$('[data-save-tabs] a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var savedTabs = JSON.parse(localStorage.getItem('savedTabs'));
if (typeof savedTabs !== 'object' || !savedTabs){
savedTabs = {};
}
savedTabs[$(this).closest('[data-save-tabs]').data('save-tabs')] = $(this).attr('href');
localStorage.setItem('savedTabs', JSON.stringify(savedTabs));
@jeffochoa
jeffochoa / Errors.js
Last active February 9, 2022 09:52
Vue Form and Error validator (Laracasts)
class Errors {
/**
* Create a new Errors instance.
*/
constructor() {
this.errors = {};
}
/**