Skip to content

Instantly share code, notes, and snippets.

@igez
igez / Created.php
Created November 2, 2016 02:17 — forked from ihor-sviziev/Created.php
Magento 1.9.1.0 time created backend for eav attribute - Fix getFormat
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@igez
igez / slackpost
Created February 7, 2017 10:20 — forked from dopiaza/slackpost
Post a message to a Slack channel
#!/bin/bash
# Usage: slackpost <token> <channel> <message>
# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
slackhost=PUT_YOUR_HOST_HERE
token=$1
@igez
igez / slugify.js
Created December 15, 2017 03:15 — forked from mathewbyrne/slugify.js
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@igez
igez / data-example.json
Last active November 5, 2019 13:48 — forked from swayvil/data-example.json
D3.js collapsing tree with boxes
{
"tree" : {
"nodeName" : "NODE NAME 1",
"name" : "NODE NAME 1",
"type" : "type3",
"code" : "N1",
"label" : "Node name 1",
"version" : "v1.0",
"link" : {
"name" : "Link NODE NAME 1",
@igez
igez / firebase-firestore.go
Created March 21, 2024 01:49 — forked from tiebingzhang/firebase-firestore.go
An example Google Firebase Firestore client in Golang, with Create/Update/Read. ** Update the service_account.json file and project-id to yours before running.
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"cloud.google.com/go/firestore"
"google.golang.org/api/option"