Skip to content

Instantly share code, notes, and snippets.

View glemiere's full-sized avatar
🐺
Happy Hunger Games

glemiere glemiere

🐺
Happy Hunger Games
  • The Matrix
View GitHub Profile
@glemiere
glemiere / gource.sh
Created May 22, 2018 00:40 — forked from XueshiQiao/gource.sh
Generate a MP4 Video for your Git project commits using Gource!
# 1.install gource using HomeBrew
$ brew install gource
# 2.install avconv
git clone git://git.libav.org/libav.git
cd libav
# it will take 3-5 minutes to complie, be patient.
./configure --disable-yasm
make && make install
@glemiere
glemiere / SailsApiCall.ts
Last active April 10, 2019 18:49
Simple class written in TypeScript to connect a ionic v2+ app to a Sails.js API v0.X (using JWT based auth). Requires SailsJS client : https://sailsjs.com/documentation/reference/web-sockets/socket-client
/**********
SailsApiCall.ts
---------------
Simple class written in TypeScript.
Connects a ionic v2+ app to a Sails.js API v0.X (using JWT based auth).
---------------
Requires SailsJS client :
https://sailsjs.com/documentation/reference/web-sockets/socket-client
**********/
/**********
next.config.js
---------------
NextJS custom webpack configuration file.
Preprocessing of images and styling with environment conditions.
---------------
Requires a NextJS project. Get started at :
https://github.com/glemiere/nextjs-starter
**********/
@glemiere
glemiere / manifest.json
Last active June 28, 2018 17:49
Progressive Web App : manifest.json simple example.
/**********
manifest.json - remove this comment before using, as JSON files don't support comments.
---------------
Simple progressive web app configuration file.
Prompts user to download app outside the stores on mobile browser.
---------------
Requires SSL enabled and service workers. Test your project for PWA using lighthouse :
https://developers.google.com/web/tools/lighthouse/
**********/
{
@glemiere
glemiere / calendar-component.html
Last active June 29, 2018 00:58
Implementation of a calendar component using Angular 2+ and two ionic components (ion-slides/ion-slide and ion-spinner).
<!--**********
calendar-component.html
Angular 2 UI Integration of a calendar component.
Displays monthly and weekly calendar, shows current day and outputs a selected day.
Refresh data on each month. Previous, current and next years should be calculated on app init for best performances.
Month to Month data calculation should be done in webworker thread for best performances.
Requires Angular 2+ and Ionic 2+ Slides/Slide and Spinner component:
@glemiere
glemiere / NotificationsService.js
Last active June 29, 2018 02:50
Simple ES5 module to send notifications through OneSignal from a NodeJS Server.
/**********
NotificationsService.js
---------------
Simple module written in ES5 to send notifications through OneSignal server-side.
NotificationsService.send : Sends a notification with the given "notif" parameter.
---------------
Requires OneSignal API key :
https://onesignal.com/
**********/
@glemiere
glemiere / server.js
Created June 29, 2018 03:55
Simple file written in ES6 to serve a ExpressJS/NextJS Server.
/**********
server.ts
---------------
Simple file written in ES6 to serve a ExpressJS/NextJS Server.
Uses SSL, Compression, redirection and service worker routing. See server config file at :
https://github.com/glemiere/nextjs-starter/tree/master/config
---------------
Requires Let's Encrypt SSL Certificate :
https://letsencrypt.org/
**********/
@glemiere
glemiere / TabsControl.ts
Last active June 29, 2018 04:21
Simple class written in TypeScript to provide control over a Ionic 2+ Tabs component. Currently provides animation between view changes using Tabs on iOS and Android.
/**********
TabsControl.ts
---------------
Simple class written in TypeScript to provide control over a Ionic 2+ Tabs component.
Currently provides animation between view changes using Tabs on iOS and Android.
---------------
Requires Ionic 2+ Tabs component and Cordova plugin NativePageTransition :
https://ionicframework.com/docs/api/components/tabs/Tabs/
https://ionicframework.com/docs/native/native-page-transitions/
---------------
@glemiere
glemiere / Slide.jsx
Last active June 29, 2018 05:57
Simple react component to produce an isomorphic iDangerous Swiper slide with lazy-loading and SVG SQIP preview.
/**********
Slide.jsx
---------------
Simple react component to produce an isomorphic iDangerous Swiper slide with lazy-loading and SVG SQIP preview.
---------------
Requires iDangerous Swiper and sqip-loader :
https://idangero.us/
https://www.npmjs.com/package/sqip-loader
**********/
@glemiere
glemiere / Articles.jsx
Created June 29, 2018 06:21
Simple react component to produce a list of Articles from a medium user account.
/**********
Articles.jsx
---------------
Simple react component to produce a list of Articles from a medium user account.
---------------
Requires you to develop an Article component.
**********/
import style from './style.scss'
import helpers from '/helpers';