Skip to content

Instantly share code, notes, and snippets.

View lamsmallari's full-sized avatar
💭
🌳

Lam lamsmallari

💭
🌳
View GitHub Profile
@lamsmallari
lamsmallari / pdocrash.php
Created June 20, 2019 02:19 — forked from bradtraversy/pdocrash.php
PDO & Prepared Statements Snippets
<?php
$host = 'localhost';
$user = 'root';
$password = '123456';
$dbname = 'pdoposts';
// Set DSN
$dsn = 'mysql:host='. $host .';dbname='. $dbname;
// Create a PDO instance
@lamsmallari
lamsmallari / example.php
Created July 10, 2018 13:27 — forked from Webcreations907/example.php
Example VC Nesting
<?php
/************************************************************************
* Example Nested For VC
* vc_map() stuff should only be included when VC is enabled.
*
* This is just for a copy/paste test purpose.
*************************************************************************/
@lamsmallari
lamsmallari / custom-search-acf-wordpress.php
Created June 26, 2018 07:57 — forked from charleslouis/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
}
<?php
/**
* Get all type posts
*
* @return void
* @author alispx
**/
function alispx_get_type_posts_data( $post_type = 'post' ) {
@lamsmallari
lamsmallari / custom-css.css
Created October 8, 2015 07:58 — forked from dom082186/custom-css.css
Custom CSS Framework
/* ========== grid layout ========== */
.full-container {
width: 100%;
}
.fixed-container {
margin: 0 auto;
padding: 0 15px;
}
@lamsmallari
lamsmallari / 00-EloquentJS
Last active August 29, 2015 14:28
Eloquent JS Exercises
_
@lamsmallari
lamsmallari / javascript_resources.md
Last active August 29, 2015 14:27 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@lamsmallari
lamsmallari / 0_reuse_code.js
Last active August 29, 2015 14:27
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