Skip to content

Instantly share code, notes, and snippets.

Avatar

Charles Peterson Artistan

View GitHub Profile
@swarupdonepudi
swarupdonepudi / install-steps-etcher-cli.md
Created Aug 13, 2017
Steps to install etcher-cli on OSX.
View install-steps-etcher-cli.md
  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.
View aligning-images.md

Aligning images

left alignment

This is the code you need to align images to the left:

<img align="left" width="100" height="100" src="http://www.fillmurray.com/100/100">
@matusk
matusk / mysql-load-data-infile.php
Created Sep 16, 2016
LOAD DATA INFILE (MySQL)
View mysql-load-data-infile.php
<?php
$dbHost = '';
$dbName = '';
$dbTable = '';
$dbUser = '';
$dbPassword = '';
$fieldSeparator = ',';
$lineSeparator = "\n";
$csvFile = 'filename.csv';
@Artistan
Artistan / 1. jquery.ejax-query-datatables.js
Last active Mar 8, 2016
elastic search datatables query
View 1. jquery.ejax-query-datatables.js
/*! 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
@sphaero
sphaero / gstreamer-build.sh
Last active Jul 8, 2020
Install & build gstreamer from git
View gstreamer-build.sh
#!/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 Jan 31, 2014
Gist Markdown Cheatsheet
View readme.md

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


Paragraph

@dylanlindgren
dylanlindgren / DateAccessorTrait.php
Last active Oct 10, 2018
Extend Carbon in Laravel with your own methods and use it on a per-model basis as a replacement for Carbon
View DateAccessorTrait.php
<?php
// app/traits/DateAccessorTrait.php
// This trait contains a copy and paste of the identically named methods
// from Laravel's Eloquent model, however anything referring to a Carbon
// instance is replaced with an instance of our own MyCarbon class.
// Ensure the /app/traits directory is included in your composer.json for autoload
trait DateAccessorTrait
{
View widget-template.js
(function($){
$.widget("ui.mywidget", {
options: {
autoOpen: true
},
_create: function(){
// by default, consider this thing closed.
You can’t perform that action at this time.