Skip to content

Instantly share code, notes, and snippets.

Denis Žoljom dingo-d

Block or report user

Report or block dingo-d

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dingo-d
dingo-d / random.php
Last active Apr 12, 2019
Random string generator
View random.php
<?php
/**
* The random string generator helper
*
* Solution implemented from http://stackoverflow.com/a/13733588/1056679
*
* Usage: CLI: php random.php {length}
* length - length of the random string to generage
*
* @since 1.0.0
View wordpress-delete-all.php
<?php
/**
* !!WARNING!!
* This script will delete everything you have in wordpress.
* I use it only when developing something that requires me to delete everything, e.g. importer.
* You can comment some parts out if you need to quickly delete just posts, or pages or so, but still be very careful!!!
*
* @author Denis Žoljom (https://github.com/dingo-d)
* @license Free to use at your own risk
@dingo-d
dingo-d / keybindings.json
Last active Feb 2, 2019
Some keybindings that help me develop in visual studio code editor
View keybindings.json
[
{
"key": "cmd+shift+[Period]",
"command": "editor.action.insertSnippet",
"args": {
"snippet": "error_log( print_r( , true ) );"
}
},
{
"key": "cmd+shift+m",
@dingo-d
dingo-d / gitconfig
Last active Feb 1, 2019
An example of gitconfig
View gitconfig
[user]
email = // email
name = // name
username = // username
signingkey = // your sign in key
[help]
autocorrect = 0
[diff]
tool = default-difftool
[difftool "default-difftool"]
View class-pointers.php
<?php
/**
* Pointers manger file
*
* @since 1.0.0
* @package Plugin
*/
namespace Plugin;
View pointers.js
/* global pointerLocalization */
export default class Pointers {
constructor() {
this.pointersList = {};
this.openedPointers = JSON.parse(localStorage.getItem('openedPointers')) || [];
this.openPointer = this.openPointer.bind(this);
this.setLabel = this.setLabel.bind(this);
this.initPointers = this.initPointers.bind(this);
}
@dingo-d
dingo-d / pointer-init.js
Created Dec 13, 2018
Init file for the pointers. Pointers script is located here: https://gist.github.com/dingo-d/a83092146c1660383cb5c3483d71cdab
View pointer-init.js
/* global pointerLocalization */
import Pointers from './pointers';
$(function() {
const pointers = new Pointers();
// Filter the current context pointers
const pointersInContext = Object.values(pointerLocalization.pointers)
.filter((pointer) => pointer.context === pointerLocalization.currentScreen);
View .zshrc
# If you come from bash you might have to change your $PATH.
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
View ruby-commands.md

Unutar rubyja

Konzola binding.pry Exit: exit-program Next: Ctrl+D

@dingo-d
dingo-d / travis-local.txt
Last active Nov 7, 2018
Locally setup travis on docker. Taken from: https://github.com/travis-ci/travis-ci/issues/9709 Used for twentynineteen travis checks.
View travis-local.txt
docker run --name travis-debug -dit travisci/ci-garnet:packer-1512502276-986baf0 /sbin/init
docker exec -it travis-debug bash -l
su - travis
rvm install 2.3.0
rvm use 2.3.0
cd builds
git clone --branch issue_9709_fix https://github.com/ekivolowitz/travis-build.git
cd travis-build
gem install travis
travis # to create ~/.travis
You can’t perform that action at this time.