Skip to content

Instantly share code, notes, and snippets.

View besabellacyrus's full-sized avatar
💭
Svelte x Sapper = <3

Cyrus Besabella besabellacyrus

💭
Svelte x Sapper = <3
View GitHub Profile
@besabellacyrus
besabellacyrus / gist:be417f745081935b9a30
Last active January 15, 2016 02:10 — forked from jordanmaslyn/gist:2861884
CodeIgniter: MY_Model
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Model extends CI_Model {
/**
* The database table to use.
* @var string
*/
public $table_name = '';
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
require_once(FUEL_PATH.'models/Base_module_model.php');
class Doctor_entries_model extends Base_module_model
{
public $has_many = array(
'clinical_focus' => array('clinical_focus_entries_model'),
'specialties' => array('specialty_entries_model'),
'clinics' => array('clinic_entries_model'),
$xsmall: 320px;
$small: 544px;
$medium: 767px;
$large: 992px;
$xlarge: 1200px;
$laptopl: 1440px;
$sixteen: 1600px;
@mixin media-breakpoint($media) {
@if $media == xs {
@besabellacyrus
besabellacyrus / gist:28f16853ec04812f2895782497350999
Created May 22, 2017 08:58
How to get relationship fuelcms
function doctor_profile($slug = NULL)
{
$data['doctor'] = fuel_model(
'doctors',
array(
'find' => 'one',
'where' => array('slug' => $slug),
'return_method' => 'object'
)
);
$data['doctor'] = fuel_model(
'doctors',
array(
'find' => 'one',
'where' => array('name' => $name),
'return_method' => 'object'
)
);
then in your view
// index.html
<div id="chat">
<ul id="message">
<li v-for="message in messages" :key="message.id">{{ message }}</li>
</ul>
<form @submit="send">
<input type="text" v-model="message">
<button>Send</button>
</form>
@besabellacyrus
besabellacyrus / webpack.config.js
Last active April 25, 2020 04:05
webpack config for Creating Chrome extensions with React
module.exports = {
entry: "./src/popup.jsx",
resolve: {
extensions: [".js", ".jsx"]
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
onFileSelected(event) {
const cloudName = 'dhs0egcjt'
const unsignedUploadPreset = 'ideliveryuploadpreset_1'
this.selectedFile = event.target.files[0]
const fd = new FormData()
fd.append('upload_preset', unsignedUploadPreset)
fd.append('tags', 'item_images')
fd.append('file', this.selectedFile)
this.isUploading = true
axios