Skip to content

Instantly share code, notes, and snippets.

View magno32's full-sized avatar

Justin Smith magno32

View GitHub Profile
@mikeygee
mikeygee / 01-before.html
Created May 7, 2012 07:45
truncate blog posts in jekyll
<!-- using the truncate filter -->
{% for post in site.posts limit:10 %}
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<span class="post-date">{{ post.date | date: "%B %d, %Y" }}</span>
{% if post.content.size > 2000 %}
{{ post.content | truncatewords: 300 }} <!-- bad! content gives you rendered html and you will truncate in the middle of a node -->
<a href="{{ post.url }}">read more</a>
{% else %}
{{ post.content }}
{% endif %}
@17twenty
17twenty / gist:2712354
Last active December 9, 2021 09:34
Getting Yocto working on the Beaglebone
# Setup for Fedora 17
sudo yum install python m4 make wget curl ftp hg tar bzip2 gzip unzip python-psyco perl texinfo texi2html diffstat openjade docbook-style-dsssl sed docbook-style-xsl docbook-dtds docbook-utils sed bc glibc-devel ccache pcre pcre-devel quilt groff linuxdoc-tools patch linuxdoc-tools cmake help2man perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils autoconf automake
sudo yum install tftp-server
sudo yum install nfs-utils
sudo yum install minicom
sudo systemctl enable nfs-server.service
sudo systemctl disable firewalld.service # This may/maynot be on your system but causes grief if it is!
# -------------------------------------------------------------------------------
@JakeWharton
JakeWharton / README.md
Last active October 13, 2015 14:38
Maven pom for Google Play services
@rxaviers
rxaviers / gist:7360908
Last active November 16, 2024 07:02
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@internaut
internaut / pandas_crossjoin_example.py
Last active June 12, 2020 14:30
Shows how to do a cross join (i.e. cartesian product) between two pandas DataFrames using an example on calculating the distances between origin and destination cities. See https://mkonrad.net/2016/04/16/cross-join--cartesian-product-between-pandas-dataframes.html
"""
Shows how to do a cross join (i.e. cartesian product) between two pandas DataFrames using an example on
calculating the distances between origin and destination cities.
Tested with pandas 0.17.1 and 0.18 on Python 3.4 and Python 3.5
Best run this with Spyder (see https://github.com/spyder-ide/spyder)
Author: Markus Konrad <[email protected]>
April 2016
@danielleevandenbosch
danielleevandenbosch / postgres_dateadd.sql
Created August 20, 2018 19:47
WARNING! slight syntax difference. See how to use. SQL server has dateadd and so should postgres. Run the following DDL and have date add in your custom user defined functions.
CREATE OR REPLACE FUNCTION dateadd(_timelabel VARCHAR(25),_timevalue NUMERIC,_timegiven TIMESTAMP)
RETURNS TIMESTAMP AS
$BODY$
DECLARE returnVal TIMESTAMP;
/*
-- =============================================
-- Author : Daniel Van Den Bosch
-- Create date: 8/20/2018
-- Description: Use dateadd (a ms sql server function) in postgres
-- How To use : Your are going to have to add quotes to the _timelabel AND it is a good idea to cast :: TO TIMESTAMP _timegiven::TIMESTAMP
@snowyu
snowyu / ts-quasar-cli.md
Created September 8, 2018 13:19
Add the typescript supports to quasar framework

Note: This guide applies to the project created by quasar-cli.

First install typescript and ts-loaderpackages in your project.

npm i -D typescript ts-loader

Then modified the quasar.conf.js file in your project: