Skip to content

Instantly share code, notes, and snippets.

StarWar / Confirm.vue
Created Apr 10, 2020 — forked from eolant/Confirm.vue
Vuetify Confirm Dialog component that can be used locally or globally
View Confirm.vue
<v-dialog v-model="dialog" :max-width="options.width" :style="{ zIndex: options.zIndex }" @keydown.esc="cancel">
<v-toolbar dark :color="options.color" dense flat>
<v-toolbar-title class="white--text">{{ title }}</v-toolbar-title>
<v-card-text v-show="!!message" class="pa-4">{{ message }}</v-card-text>
<v-card-actions class="pt-0">
<v-btn color="primary darken-1" text @click.native="agree">Yes</v-btn>
StarWar / media-query.css
Created Apr 7, 2019 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
##Device = Desktops
##Screen = 1281px to higher resolution desktops
@media (min-width: 1281px) {
StarWar / environment.js
Created Dec 25, 2018 — forked from nerdcave/environment.js
PurgeCSS config for Rails 5 and Webpacker (along with Tailwind CSS and Vue.js, in this case)
View environment.js
// first run:
// yarn add glob-all purgecss-webpack-plugin --dev
PurgeCSS configuration for Rails 5 + Webpacker + Tailwind CSS + Vue.js
Optionally, put this in production.js if you only want this to apply to production.
For example, your app is large and you want to optimize dev compilation speed.
StarWar / fibonacci.ex
Created Oct 29, 2018 — forked from dhc02/fibonacci.ex
Fibonacci sequence in Elixir
View fibonacci.ex
defmodule Fibonacci do
def find(nth) do
list = [1, 1]
fib(list, nth)
def fib(list, 2) do
StarWar /
Created Aug 31, 2018 — forked from jboesch/
Importing a CSV dump of Postgres data into Heroku
# You have your csv data and it looks like so... It's in a file named "my_data.csv" and we want to import it into a table named "my_things".
"1", "Something", "0.50", "2013-05-05 10:00:00"
"2", "Another thing", "1.50", "2013-06-05 10:30:00"
# Now you want to import it, go to the command line and type:
$ PGPASSWORD=PWHERE psql -h HOSTHERE -U USERHERE DBNAMEHERE -c "\copy my_things FROM 'my_data.csv' WITH CSV;"
# Voila! It's impoted. Now if you want to wipe it out and import a fresh one, you would do this:
View cookie-consent.html
StarWar / get-first-image.php
Created Mar 14, 2018 — forked from tommaitland/get-first-image.php
WordPress helper function that retrieves the first image from a post, with basic support for swapping the image size.
View get-first-image.php
Based on the original CSS-Tricks code (
## Usage
Include in functions.php
<?php echo get_first_image('thumbnail'); ?>
StarWar /
Created Jan 3, 2018 — forked from tzmartin/
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')[OFFICE_FILE_URL]

<iframe src='[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>

OneDrive Embed Links

StarWar / citations
Created Dec 29, 2017 — forked from bussiere/citations
citations quote informatic informatique quotes computer science
View citations
“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
“In order to understand recursion, one must first understand recursion.” – Author Unknown
“I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone.” – Bjarne Stroustrup
“A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila.” – Mitch Ratcliffe
“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -C.A.R. Hoare
“The gap between theory and practice is not as wide in theory as it is in practice.” – Author Unknown
“If builders built buildings the way progra
View gist:d17f10a9f1bb87d488e5859ae80e4fc4
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep elasticsearch
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
launchctl remove homebrew.mxcl.elasticsearch
pkill -f elasticsearch