Skip to content

Instantly share code, notes, and snippets.

View andreisebastianc's full-sized avatar

Andrei Sebastian Cîmpean andreisebastianc

View GitHub Profile
Computer Information:
Manufacturer: ASUSTeK COMPUTER INC.
Model: ROG STRIX X570-F GAMING
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 7 3700X 8-Core Processor
CPU Family: 0x17
CPU Model: 0x71
@andreisebastianc
andreisebastianc / pull_request_template.md
Last active May 2, 2020 17:11
Pull request template
Status Type Ticket
Ready/Hold Feature/Bug/Tooling/Refactor/Hotfix Link

NOTE: use notes like this to emphasize something about the PR. This could include other PRs this PR is built on top of; new or removed environment variables; reasons for why the PR is on hold; or anything else you would like to draw attention to.

DEV Checklist (all are mandatory)

  • qunit tests pass
  • lint tests pass
@andreisebastianc
andreisebastianc / gist:fcb7cf7664f3fc89c27f6dcc29a4ddef
Created September 13, 2018 16:29
Create a placeholder image for a given size from terminal ( requires imagemagic )
convert -size 200x150 xc:White \
-gravity Center \
-weight 100 -pointsize 20 \
-annotate 0 "PLACEHOLDER IMAGE" \
home__prod-small.png
@andreisebastianc
andreisebastianc / index.html
Last active September 4, 2017 13:40
Glimmer that receives redux store from outside the compiled webcomponent
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Hello Glimmer</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/ember-cli-live-reload.js" type="text/javascript"></script>
@andreisebastianc
andreisebastianc / app.component.ts
Last active October 10, 2016 09:26
Some angular2 dummy component
import {
Component
} from "@angular/core";
interface User {
name: string;
image: string;
fullname: string;
}
@andreisebastianc
andreisebastianc / pre-commit
Created July 18, 2016 12:27
Pre-commit git hook for running tests
# Redirect output to stderr.
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
exec 1>&2
git stash -q --keep-index
echo "Running tests..."
@andreisebastianc
andreisebastianc / gist:27d2735d1c10b400a0ff
Last active March 29, 2016 09:39
Backbone course example
<html>
<head>
<script src="http://backbonejs.org/test/vendor/underscore.js"></script>
<script src="http://backbonejs.org/test/vendor/jquery.js"></script>
<script src="http://backbonejs.org/docs/js/jquery.lazyload.js"></script>
<script src="http://backbonejs.org/backbone.js"></script>
<script type="text/javascript">
$(function() {
var response = [
{
@andreisebastianc
andreisebastianc / example.js
Created March 18, 2016 10:34
Create random playlists from a list of songs read from a google spreadsheet
request('https://spreadsheets.google.com/feeds/list/1rlv-9lSYBvY9Do-KAof8vkG89iLnsGz1_-NpEm1tOe8/od6/public/values?alt=json-in-script', (err, resp, body) => {
if (!err && resp.statusCode == 200) {
console.log('songs read from google drive');
// let b = body.replace('gdata.io.handleScriptLoaded(', '');
// b = b.slice(0, -2);
body = stripGDriveBody(body);
const songs = JSON.parse(body).feed.entry;
const playlists = [];
@andreisebastianc
andreisebastianc / example.js
Created March 9, 2016 13:41
Duck typing dropdowns in javascript
class Select {
constructor(options, element, selectedOptionsIndex=0, customBehavior={}) {
this.options = options;
this.selectedOptionsIndex = selectedOptionsIndex;
this.el = element;
// alternative you'd use _.extend
Object.keys(customBehavior).forEach(key => { this[key] = customBehavior[key] });
}
render() {
@andreisebastianc
andreisebastianc / index.html
Last active September 15, 2015 09:35
Pre-employment live coding with bugs fixed
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script type="text/javascript" src="http://underscorejs.org/underscore-min.js"></script>
<script type="text/javascript" src="http://backbonejs.org/backbone-min.js"></script>
<title>BB::APP</title>
</head>
<body>
<h1>Welcome to your profile</h1>