Skip to content

Instantly share code, notes, and snippets.

View beeman's full-sized avatar
🐝
Buzzin....

beeman beeman

🐝
Buzzin....
View GitHub Profile
@micdenny
micdenny / iframe-tracker.component.html
Last active March 25, 2024 20:20
How to detect a click event on a cross domain iframe (iframe.tracker)
<div>
<iframe appIframeTracker (iframeClick)="onIframeClick()" src="http://www.google.com"></iframe>
</div>
@talk2MeGooseman
talk2MeGooseman / index.js
Last active November 16, 2022 15:24
Firebase Cloud Function 3rd Party Oauth Flow For The Web
const functions = require('firebase-functions');
var admin = require("firebase-admin");
const cookieParser = require('cookie-parser');
const crypto = require('crypto');
var serviceAccount = require("./service-account.json");
const APP_NAME = "twitch-playground";
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
@beeman
beeman / dploy-colmena.sh
Last active August 20, 2017 18:52
Install Colmena on dply.co https://dply.co/b/q6aJuU0e
#!/bin/sh
# Create and activate swap
dd if=/dev/zero of=/swapfile bs=256M count=4
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
# Activate swapfile on boot
echo "" >> /etc/fstab
echo "/swapfile none swap sw 0 0" >> /etc/fstab
@gauntface
gauntface / sw-unit-tests.js
Created March 6, 2017 22:06
An example of Mocha running in a service worker / web worker.
importScripts('/node_modules/mocha/mocha.js');
mocha.setup({
ui: 'bdd',
reporter: null,
});
describe('First SW Test Suite', function() {
it('should test something', function() {
...
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active May 5, 2024 04:06
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@gaearon
gaearon / connect.js
Last active April 11, 2024 06:46
connect.js explained
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (

fc-base-pen [ Angular - UI-Router - Bootstrap ]

This is a template with :

  • angular 1.5.3
  • ui-router 1.0.0-alpha.4
  • bootstrap-3.3.6
  • font-awesome-4.6.1

A couple of notes on this template:

@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@ducin
ducin / README.md
Last active April 15, 2018 15:33
JSON-Schema-faker console basic demo

JSON-Schema-faker demo

Run the following:

npm install
node run.js

to execute the demo.