Skip to content

Instantly share code, notes, and snippets.

View novrian's full-sized avatar
jangan lupa ngopi

Nono Novrian novrian

jangan lupa ngopi
View GitHub Profile
@novrian
novrian / README.md
Last active October 13, 2018 13:21
dgraph.md

PHP Test

Buatlah sebuah function dalam bahasa PHP dengan nama str dengan satu argumen.

Output yang diharapkan seperti dibawah ini:

  1. Jika argumen diset 1
php
@novrian
novrian / practice.md
Last active April 19, 2018 08:36
Deskripsi Latihan Web Development

Latihan Web Development

erd

Definisi Tabel

Tabel pegawai

Field Type
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@novrian
novrian / Select2.php
Created January 20, 2017 11:35 — forked from tortuetorche/Select2.php
Select2 v3.5 helpers for the WebDriver module of Codeception 2.1 (WIP)
<?php
namespace Helper;
// Select2 helpers for the jQuery based replacement for select boxes.
// See: http://select2.github.io/select2
// Author: Tortue Torche <tortuetorche@spam.me>
// License: MIT
//
// Installation:
// * Put this file in your 'tests/_support/Helper' directory

Awesome PHP

A curated list of amazingly awesome PHP libraries, resources and shiny things.

Categories

  • Composer
  • Composer Related
  • Frameworks
  • Framework Components
@novrian
novrian / strip-unit.scss
Created October 8, 2013 05:22
Strip Unit SASS Function
// Thanks to @robwierzbowski on github
// See https://github.com/nex3/sass/issues/533#issuecomment-11675408
@function strip-units($value) {
@return $value / ($value * 0 + 1);
}
@novrian
novrian / sprite-cache.rb
Created September 11, 2013 15:15
Put this on your config.rb to make compass generate sprite without hash.
# Thanks to piouPiouM
#
# @see http://stackoverflow.com/questions/9183133/how-to-turn-off-compass-sass-cache-busting/9332472#9332472
# @link http://pioupioum.fr/developpement/compass-sprites-supprimer-cache-buster.html
# Make a copy of sprites with a name that has no uniqueness of the hash.
on_sprite_saved do |filename|
if File.exists?(filename)
FileUtils.cp filename, filename.gsub(%r{-s[a-z0-9]{10}\.png$}, '.png')
end
@novrian
novrian / yoast-bootstrap-breadcrumb.php
Last active March 14, 2019 16:09
Yoast Breadcrumb with Twitter Bootstrap Markup
<?php
/**
* Yoast Breadcrumbs on Twitter Bootstrap
*
* @author Novrian <me@novrian.info>
* @copyright (c) 2013. Novrian Y.F.
* @license MIT License
* @param string $sep Your custom separator
*/
function novrian_breadcrumbs($sep = '/') {
@novrian
novrian / bootstrap_pagenavi.php
Last active September 19, 2018 08:09
Wordpress Pagenavi Helper to display pagenavi like Twitter Bootstrap Pagination
<?php
/**
* Twitter Bootstrap Pagenavi
*
* This is tweaks function to display WP-Pagenavi markup that displayed like
* Twitter Bootstrap Pagination.
*
* Do not fille the pagenavi's options below:
* - Text For Number Of Pages
* - Text For `First` / `Last Page`
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path