Skip to content

Instantly share code, notes, and snippets.

View iamntz's full-sized avatar
🐛
Coding Stuff

Ionuț Staicu iamntz

🐛
Coding Stuff
View GitHub Profile
@iamntz
iamntz / StefanZWrapBox
Created August 29, 2011 09:24 — forked from anonymous/StefanZWrapBox
Wrap box for my current project
$('.borderedBox, #content').each(function() {
var t = $(this),
mainClasses = this.className,
mainIds = this.id,
idAttr = ( mainIds ? ' id="' + mainIds + '"' : '' ),
classAttr = ( mainClasses ? ' class="' + mainClasses + '"' : '' );
t.wrap('<div ' + idAttr + classAttr + ' / >');
t.removeAttr('class').removeAttr('id');
});
$('.typeahead').typeahead({
});
$('.group').on('change', function (e) {
if (e.target.value == "") {
return;
}
$('.typeahead').typeahead({
});
var groupFocusTimer;
$('.group').on('change', function (e) {
if (e.target.value == "") {
return;
}
import sublime
import sublime_plugin
import string
class MultiSelectNumbersCommand( sublime_plugin.TextCommand ):
def run(self, edit):
view = self.view;
window = view.window()
def countThoseSelections(pattern):
@iamntz
iamntz / 0_reuse_code.js
Created May 31, 2014 18:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
var fs = require('fs');
var path = require('path');
var readline = require('readline');
var args = process.argv.slice(2);
var clientName, projectName;
clientName = projectName = args[0];
if( args[1] ){
projectName = args[1];
@iamntz
iamntz / repeatable.php
Last active October 3, 2018 11:07 — forked from JAW-Dev/repeatable.php
Repeatable Option Fields
<?php
define('OU_PL_OPTIONS', 'OU_PL_OPTIONS');
define('OU_PL_PREFIX', 'OU_PL_PREFIX');
define('OU_PL_TEXTDOMAIN', 'OU_PL_TEXTDOMAIN');
if( !class_exists( 'OU_Settings' ) ) {
class OU_Settings {
/**
* Option
*
@iamntz
iamntz / HandlePutFormData.php
Last active October 16, 2024 08:06 — forked from Stunext/HandlePutFormData.php
Laravel: Middleware to support multipart/form-data in PUT, PATH and DELETE requests. Deals with one level of form arrays.
<?php
namespace App\Http\Middleware;
use Closure;
use Symfony\Component\HttpFoundation\ParameterBag;
/**
* @author https://github.com/Stunext
*
* PHP, and by extension, Laravel does not support multipart/form-data requests when using any request method other than POST.