Skip to content

Instantly share code, notes, and snippets.

View agalazis's full-sized avatar
🌴
On vacation

Andreas Galazis agalazis

🌴
On vacation
View GitHub Profile
@agalazis
agalazis / best-node-typescript-generators-install.sh
Last active December 19, 2017 14:18
Best Generators Cheat sheet just the favourites... <3
#!/bin/bash
yarn global add generator-express-no-stress-typescript
yarn global add generator-ts-np
@agalazis
agalazis / fedora-26-arm-rpi3-installer.sh
Last active November 11, 2017 21:31
Script that installs fedora arm on rpi
MEDIA=$1
if [ -z "$MEDIA" ]; then
echo "Please enter media name:"
read MEDIA
fi
[ -z "$MEDIA" ] && printf "[error]: %s\n" "Media optiion is required" >&2 && exit 1 ;
IMAGE="Fedora-Server-armhfp-26-1.5-sda.raw.xz"
TEMP_DIR=$(mktemp -d)
TEMP_IMAGE_FILE_PATH="$TEMP_DIR/$IMAGE"
curl https://download.fedoraproject.org/pub/fedora/linux/releases/26/Server/armhfp/images/$IMAGE -L -o "$TEMP_IMAGE_FILE_PATH"
@agalazis
agalazis / gdbv8.md
Last active August 7, 2016 19:20
GDB debugging on latest version of node
 gdb attach $(pidof node)
 b v8::internal::Runtime_StackGuard
 print 'v8::Isolate::GetCurrent'()
 -----------------------------
 output: $1=<result>
 ---------------------
print 'v8::Isolate::TerminateExecution'(<result>)
c
@agalazis
agalazis / install.sh
Created July 20, 2016 22:39 — forked from vodolaz095/install.sh
Little script to help me installing Fedora 23 linux on my home PCs (comment lins you do not need)
#!/bin/sh
echo "Start SSHD service"
systemctl enable sshd
systemctl start sshd
echo "Remove junky programs i hate"
dnf -y remove clipit asunder gnomebaker lxmusic gnumeric osmo pidgin xpad
echo "Upgrade system"
@agalazis
agalazis / Angular_sources.md
Last active July 29, 2016 17:11
Angular sources:
#DI:
##Intro
(nice mock example at 19:30)
https://www.youtube.com/watch?v=_OGGsf1ZXMs
###Injectors providers dpendencies explained:
http://blog.thoughtram.io/angular/2015/05/18/dependency-injection-in-angular-2.html
#Agular shadow dom
https://www.youtube.com/watch?list=PLOETEcp3DkCq788xapkP_OU-78jhTf68j&v=J5Bvy4KhIs0
@agalazis
agalazis / GULP.noob.markdown
Last active June 11, 2016 18:10
Cheat sheets for the noob..... Cheat sheets written when I was a noob at using some tech...

#GULP

@agalazis
agalazis / README.md
Created February 24, 2016 19:45 — forked from kjantzer/README.md
Backbone.js & Underscore.js Natural Sorting

Backbone.js & Underscore.js Natural Sorting Algorithm

Backbone is great but I continually found the default sorting method limited due to the following:

Disc 1, Disc 2, … Disc 10 would become Disc 1, Disc 10, Disc 2

With the help of Jim Palmer's naturalSort.js, I was able to integrate natrual sorting into Backbone.Collection.

Backbone collections are automatically sorted and now, by simply adding sortType:"natural", your collections can be sorted naturally.

@agalazis
agalazis / average-age.js
Created December 27, 2015 21:46 — forked from bennadel/average-age.js
The Best Way To Compute The Average Age Of Cat Owners In Functional Programming
var _ = require( "lodash" );
// Assume a collection that has:
// - age: Number
// - hasCat: Boolean
var people = require( "./people.json" );
// ----------------------------------------------------------------------------------- //
// ----------------------------------------------------------------------------------- //
@agalazis
agalazis / linboxSetup
Last active December 20, 2015 22:03
Linbox Setup Script
#!/bin/bash
cd ~&&curl http://download2.mikrotik.com/routeros/winbox/3.0/winbox.exe>winbox.exe\
&& echo "alias linbox='/usr/bin/wine ~/winbox.exe'" >> ~/.bashrc\
&& exec bash