Skip to content

Instantly share code, notes, and snippets.

@nickstamas
nickstamas / Onboarding Animation Prototype.js
Last active February 17, 2025 21:53
Onboarding Animation Reference
import React, { useState, useEffect } from 'react';
import { ArrowRight, Trophy } from 'lucide-react';
const OnboardingQuiz = () => {
const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0);
const [isAnimating, setIsAnimating] = useState(false);
const [selectedAnswer, setSelectedAnswer] = useState(null);
const [showXPAlert, setShowXPAlert] = useState(false);
const [displayedXP, setDisplayedXP] = useState(0);
@nickstamas
nickstamas / parser.js
Last active January 30, 2019 12:34
Parsing JSON lines data for https://overinstagram.com
var lineReader = require('readline').createInterface({
input: require('fs').createReadStream('./focussion-filtered-2.jl')
});
var results = {};
lineReader.on('line', function (line) {
var json = JSON.parse(line);
try {
if (json["username"] && json["username"][0] === "/ViewsOfParadise") {
$(function() {
$.each( $(".submission_user_select"), function(key, el) {
$(el).tokenInput("/teams/"+$(el).attr('data-team-id')+"/team_members.json", {
crossDomain: false,
prePopulate: $("#submission_user_id").data("pre"),
hintText: "Type a member name...",
tokenLimit: 1,
propertyToSearch: "full_name",
placeholder: "Type a member name...",
theme: "facebook",
{
"post": {
"id": "21",
"title": "Gettysburg Address",
"publishDate": "000000000",
"blocks": [
{
"orderingId": "0.0",
"tag": "p",
"text": "Four score and **seven** years ago...",
@nickstamas
nickstamas / gist:7506528
Created November 16, 2013 22:58
asdgasdg
gasgas
$(function(){
$('#response_note').enableSubmitOnType();
});
jQuery.fn.enableSubmitOnType = function() {
$("input[type=submit]").attr("disabled", "disabled");
this.keyup(function(e){
var textInput = $(e.target);
var formEl = $(textInput).closest('form');
var submitButton = $(formEl).find('input[type=submit]');
@nickstamas
nickstamas / dabblet.css
Created December 2, 2012 02:58
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
font-family: 'Proxima Nova', 'Helvetica Neue', Helvetica, sans-serif;
}
.img-wrapper {
position: relative;
class RelationshipsController < ApplicationController
before_filter :authenticate
def create
@user = User.find(params[:relationship][:followed_id])
current_user.follow!(@user)
respond_to do |format|
format.html { redirect_to @user }
format.js
end
@nickstamas
nickstamas / dabblet.css
Created April 18, 2012 17:41
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #ffffff;
.action-container {
background: #ddd;
width: 600px;
height: 100px;
a:hover {
text-decoration: underline !important;
}
td.promocell p {
color:#e1d8c1;
font-size:16px;
line-height:26px;
font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;
margin-top:0;
margin-bottom:0;