Skip to content

Instantly share code, notes, and snippets.

all the SPAs, all the time

Roy R. tchalvak

all the SPAs, all the time
View GitHub Profile
tchalvak /
Last active Jan 19, 2018 — forked from johnduarte/
BlueJeans rpm install on Debian

FYI, for those of us not running Debian based systems rather than RedHat, the BlueJeans RPM can be successfully installed via alien

Steps to install BlueJeans on Debian

  • Download BlueJeans RPM
  • Install alien package sudo apt-get install alien
  • Convert BlueJeans RPM to a DEB package sudo alien --to-deb --scripts bluejeans-*.rpm
  • Install resulting DEB sudo dpkg -i bluejeans_*.deb
  • Run BlueJeans with /opt/bluejeans/bluejeans-bin

You may get an error loading the expected udev library

tchalvak / bling.js
Created Dec 22, 2017 — forked from paulirish/bling.js
bling dot js
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
NodeList.prototype.__proto__ = Array.prototype;
View gist:0ebd5c843ffbf0aabf4c08b3f88d7804
function series(state = {}, action) {
switch (action.type) {
const series = ? : []
return series.reduce((acc, series) => {
return Object.assign({}, acc, { [series.unique_key] : series })
}, state)
return state
View Create a simple chat app
Show us how you would code a simple web chat application!
As a web developer, you've certainly used a web chat before, and maybe you have even coded one before.
Let's see if you can use these customer/client stories, and all your skills as a dev, to create a nice, simple chat app.
Here are the stories:
- As a customer, Bob want to chat on the website with other customers, so he can be part of the community.
- As a customer, Jane wants to choose a username, send some chat messages, and see her chats even after a page reload.
- As a corporate admininstrator, Greg wants the chat to get a nice initially designed template, so he can can present it as part of a corporate retreat.
View NoJuice4u.js
var myTeam =;
var eSoldiers = [];
var itemUpdateDelay = 0.5;
var itemTimer = 0;
var soldiersCount = 0;
var goldStormCD = 0;
var firstBlast = true;
var initiate = false;
var atkType = 2;
var manaBlastCD =;
View Simpler recursive max
// Recursively determine the max
// Does not handle badly formed input
// Not yet optimized for performance
function my_max( $data ) {
return $data; // end of the line, just return the int
$max = null;
View recursive_integer_maximum
// Recursively determine the max
// Does not handle badly formed input
// Not yet optimized for performance
function my_max( $data ) {
$max = null;
foreach($data as $elem){
$new_max = is_array($elem)? my_max($elem) : $elem;
$max = $new_max > $max? $new_max : $max;
tchalvak / WhatTheFuckLNWhyDoYouActThisWay
Created Dec 29, 2014
View WhatTheFuckLNWhyDoYouActThisWay
mkdir temp
cd temp
mkdir deploy
echo "Contents of the build file!" > deploy/
ln -s deploy/ deploy/resources.php
cat deploy/resources.php
echo "That cat should work, but it doesn't, how the flip do people create symlinks in subdirectories then? So weird."
View nw.sql
-- PostgreSQL database dump
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
tchalvak / cakepi.php
Created Aug 6, 2012
Simple Programming task
View cakepi.php
Using php, write a program that must fulfill these requirements:
For the numbers from 1 to 100,
If the number is a multiple of 3, print cake instead of the number.
If the number is a multiple of 5, print pi instead of the number.
If the number is a multiple of both 3 and 5, print cakepi instead of the number.
You can’t perform that action at this time.