Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View vidjuheffex's full-sized avatar
🏠
Working from home

Julian Herrera vidjuheffex

🏠
Working from home
View GitHub Profile
@vidjuheffex
vidjuheffex / selectionSetPicker.py
Created March 30, 2017 19:24
finds all quick selection sets in the scene. Adds them to a panel to make selecting them easier
import maya.cmds as cmds
from functools import partial
class selectionSetGUI(object):
def __init__(self):
return None
def select(self, set, *args):
print set
// Answer the following questions in this file using comments without running the code
// 1.
// What does `givenName` equal right now?
var givenName;
// A: undefined
// 2.
// What is `givenName` set to right now?
@vidjuheffex
vidjuheffex / main.js
Created June 6, 2017 19:47
Function Expression Individual Assesment
// 1.
// Define a function max() that takes two numbers as arguments and returns the largest of them. Use the if-then-else construct available in JavaScript.
// A:
function max(num1, num2){
return (num1 > num2) ? num1 : num2;
}
// 2.
@vidjuheffex
vidjuheffex / main.js
Created June 7, 2017 20:35
arrays and loops
// 1.
// Without logging the values, list the value of `sports` and `total`
var sports = ['soccer', 'baseball'];
var total = sports.push('football', 'swimming');
// A:
// sports = ['soccer', 'baseball'];
// total = ['soccer', 'baseball', 'football', 'swimming']
// 2.
@vidjuheffex
vidjuheffex / README.md
Created June 12, 2017 20:10
Object and scope Assesment

Scope, hoisting and compartmentalization

Answer the following:

In you own words, explain the concepts of scope, hoisting, compartmentalization.

Scope: The section of code within which a variables value holds.

Hoisting: How the javascript interpreter rearranges your code before evaluation. By bringing variable declration and function definitions to the top.

Compartmentalization: Taking advantage of scope to minimize pollution of the global environment.

@vidjuheffex
vidjuheffex / main.js
Created July 17, 2017 16:59
Modifications to main.js to have tests pass
//###################################################################
// __
// ____/ /___ ____ ______
// / __ / __ \/ __ `/ ___/
// / /_/ / /_/ / /_/ (__ )
// \__,_/\____/\__, /____/
// /____/
// Dog Constructor & Prototype
var Dog = {
@vidjuheffex
vidjuheffex / classes.js
Created July 18, 2017 19:19
ES6 classes
// CLASSES PROJECT
// In this project, you will build a Mazda car factory that manufactures both cars and trucks.
// Read each set of instructions carefully!
// BUILD YOUR FACTORY!
// DECLARE A FACTORY CLASS
// All automobiles manufacutered should have the following properties: make (Mazda), location (USA), airbags (true), abs (true), warranty (60,000 miles / 3 years)
// This factory should also run two functions: massBuild() and customerBuild()
@vidjuheffex
vidjuheffex / main.scm
Last active August 16, 2020 04:06
mpg123 - port audio chez example
#!/usr/bin/env scheme-script
;; -*- mode: scheme; coding: utf-8 -*- !#
;; Copyright (c) 2020 Julian Herrera
;; SPDX-License-Identifier: MIT
#!r6rs
(import (chezscheme)(prefix (mpg123) mpg123:)(lento))
(define lib-portaudio (load-shared-object "libportaudio.so"))
@vidjuheffex
vidjuheffex / qwebchannelexample.py
Last active March 14, 2022 01:24
QWebChannel Example Script
"""create a remote connection to a webapp."""
import sys
import json
from PySide6.QtWidgets import QApplication, QMainWindow
from PySide6.QtNetwork import QHostAddress, QSslSocket
from PySide6.QtWebChannel import QWebChannel, QWebChannelAbstractTransport
from PySide6.QtWebSockets import QWebSocketServer
from PySide6.QtWebEngineWidgets import QWebEngineView
@vidjuheffex
vidjuheffex / init.el
Last active July 13, 2023 20:32
temp emacs explorations
;; package
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
;; use-package