Skip to content

Instantly share code, notes, and snippets.

View Artistan's full-sized avatar

Charles Peterson Artistan

View GitHub Profile
(function($){
$.widget("ui.mywidget", {
options: {
autoOpen: true
},
_create: function(){
// by default, consider this thing closed.
@Artistan
Artistan / 1. jquery.ejax-query-datatables.js
Last active March 8, 2016 18:41
elastic search datatables query
/*! Ejax Datatables - v0.0.1 - 2016-02-19
* Copyright (c) 2016 charles peterson; Licensed MIT */
(function ($) {
/**
* debug_ejax = console.log alot of crap
* elastic_json = the query for elastic
* pkey = key to define the object data structure if y`ant to
* serverUrl = elasticsearch server search path
* callbackSearch = callback to change the search for your elastic_json based on databases search updates made by the user
* callbackRow = callback to modify result row
@matusk
matusk / mysql-load-data-infile.php
Created September 16, 2016 14:32
LOAD DATA INFILE (MySQL)
<?php
$dbHost = '';
$dbName = '';
$dbTable = '';
$dbUser = '';
$dbPassword = '';
$fieldSeparator = ',';
$lineSeparator = "\n";
$csvFile = 'filename.csv';
@swarupdonepudi
swarupdonepudi / install-steps-etcher-cli.md
Created August 13, 2017 02:07
Steps to install etcher-cli on OSX.
  1. Download the etcher-cli tar file from the official downloads page

curl -O https://github.com/resin-io/etcher/releases/download/v1.1.2/Etcher-cli-1.1.2-darwin-x64.tar.gz
  1. Extract the tar file

tar fvx path/to/cli.tar.gz
  1. Create the directory in /opt folder and move the contents to the new folder
mkdir -p /opt/etcher-cli
mv -R Etcher-cli-1.1.2-darwin-x64 /opt/etcher-cli
  1. Add /opt/etcher-cli to PATH variable. This needs to be added to your login shell profile. I have added it to ~/.zshrc file.
@sphaero
sphaero / gstreamer-build.sh
Last active February 11, 2023 16:25
Install & build gstreamer from git
#!/bin/bash --debugger
set -e
BRANCH="master"
if grep -q BCM2708 /proc/cpuinfo; then
echo "RPI BUILD!"
RPI="1"
fi
[ -n "$1" ] && BRANCH=$1
@benstr
benstr / readme.md
Created January 31, 2014 22:11
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph

@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment