Skip to content

Instantly share code, notes, and snippets.

View lastlink's full-sized avatar
:octocat:
branching out

lastlink lastlink

:octocat:
branching out
View GitHub Profile
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@rikukissa
rikukissa / POST.md
Last active January 27, 2020 08:10
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom #angular.js #testing
title slug createdAt language preview
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom
unit-testing-angular-js-app-with-node
2015-07-05T18:04:33Z
en
Majority of search result about unit testing Angular.js apps is about how to do it by using test frameworks that run the tests in a real browser. Even though it's great to be able to test your code in multiple platforms, in my opinion it creates a lot of boilerplate code and makes it hard to run the tests in, for instance a CI-server.

Testing Angular.js app headlessly with node.js + mocha

Lean unit tests with minimal setup

@andrewmurray
andrewmurray / gist:b63b7592386cb67124d1
Last active February 14, 2024 12:17
Convert an Epplus ExcelPackage to a CSV file, returning the byte[] array of this new CSV file. Taking the code provided by "Brad" at http://codejournal.blogspot.co.uk/2012/03/using-epplus-library-to-convert-xlsx-to.html and creating an extension method from it which can be called on Epplus' ExcelPackage. Just call excelPackageObject.ConvertToCsv();
using OfficeOpenXml;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace WebUI.Infrastructure
{
public static class StringUtils
{
private static string DuplicateTicksForSql(this string s)
@mimming
mimming / rename-firebase-key.js
Created September 18, 2014 00:15
Rename a key in firebase across many nodes
var ref = new Firebase("https://<your-firebase>.firebaseio.com/path-to-your-node");
ref.on("child_added", function(snap) {
var data = snap.val();
data.phonenumber = data.contact;
delete data.contact;
ref.child(snap.name()).set(data, function(error) {
if( error && typeof(console) !== 'undefined' && console.error ) { console.error(error); }
});
});
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active November 7, 2022 09:11
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@ichord
ichord / gist:9808444
Created March 27, 2014 14:12
demo of using pdf.js to extract pages to images
<script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><html>
<!--
Created using jsbin.com
Source can be edited via http://jsbin.com/pdfjs-helloworld-v2/8598/edit
-->
<body>
<canvas id="the-canvas" style="border:1px solid black"></canvas>
<input id='pdf' type='file'/>
<!-- Use latest PDF.js build from Github -->
@Chitrank-Dixit
Chitrank-Dixit / linkedin_data.php
Created December 26, 2013 14:26
Get Data from Linkedin after authorization
<?php
// Change these
define('API_KEY', 'Your App API KEY' );
define('API_SECRET', 'Your App API SECRET' );
define('REDIRECT_URI', 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']);
define('SCOPE', 'r_fullprofile r_emailaddress rw_nus' );
// You'll probably use a database
session_name('linkedin');
session_start();
@rxaviers
rxaviers / gist:7360908
Last active May 24, 2024 10:40
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:
@mariusGundersen
mariusGundersen / gist:6925246
Last active May 8, 2022 20:38
Programmer collective nouns