Skip to content

Instantly share code, notes, and snippets.

View nickgs's full-sized avatar
👋

Nick Selvaggio nickgs

👋
  • Sego Solutions, LI Blockchain
  • Long Island
  • X @direct
View GitHub Profile
@nickgs
nickgs / Soundboard.js
Last active April 8, 2019 02:24
Soundboard from class on 04/3/19
let osc, env, analyzer;
let notes = [220, 330, 120];
let pad_size = 100;
let pad1;
let pad2;
function setup() {
createCanvas(710, 200);
pad1 = new Pad(220, 100, 100);
pad2 = new Pad(330, 200, 200);
@nickgs
nickgs / dvdlogo.js
Created February 28, 2019 13:57
DVD Logo Sketch v1
var x;
var y;
var xspeed;
var yspeed;
// Our setup function.
function setup() {
createCanvas(800, 600);
background("#000000");
@nickgs
nickgs / DrupalNode.js
Created February 26, 2019 21:30
Super simple example of a React component consuming a Drupal node exposed via the core REST functionality in Drupal 8.
import React from 'react';
/**
* Super simple example of a React component consuming a Drupal node exposed via the core REST functionality in Drupal 8.
*/
export default class DrupalNode extends React.Component {
constructor(props) {
super(props);
this.state = {
Verifying my Blockstack ID is secured with the address 19pMr7PMm8bVyCeCN7xbNbmxfpiqH51k8n https://explorer.blockstack.org/address/19pMr7PMm8bVyCeCN7xbNbmxfpiqH51k8n
$conf['mail_system'] = array(
'default-system' => 'DevelMailLog',
);
$conf['devel_debug_mail_directory'] = '/tmp/develmail';
@nickgs
nickgs / gist:cdc2870ca48951ef1149
Created February 11, 2016 14:57
ADbuilder Embed Code
<a href="http://www.adctoday.com/diagnostix/embed" target="_blank" onClick="window.open(this.href,'mywindow','width=920,height=700,resizable=yes,location=no,scrollbars=yes'); return false;"><img src="http://www.adctoday.com/sites/default/files/embed_button.png"></a>
@nickgs
nickgs / blocks1.php
Last active September 8, 2015 21:30
Quick and dirty example of how one may split the block implementation to multiple files
<?php
function myblock1() {
$blocks = array();
$blocks['myblock1'] = array(
'info' => t("Block 1"),
);
//...
### Keybase proof
I hereby claim:
* I am nickgs on github.
* I am nickgs (https://keybase.io/nickgs) on keybase.
* I have a public key whose fingerprint is 030E 3C42 3D23 3948 CF5B D186 CF31 48D2 87E5 915F
To claim this, I am signing this object:
@nickgs
nickgs / gist:2cddb29576e9343be9b5
Created July 21, 2015 18:37
Example of building a link from an text field.
//example of building a link from an text field.
$nid = 1;
$node = node_load($nid);
$field = field_get_items('node', $node, 'field_link');
$link = array(
'#theme' => 'link',
'#text' => $field[0]['safe_value'],
'#path' => $field[0]['safe_value'],
'#options' => array(
@nickgs
nickgs / gist:39477a72cdcd6743e6e1
Last active August 29, 2015 14:22
ADbuilder Embed Code
<a href="http://www.adctoday.com/diagnostix/embed" target="_blank" onClick="window.open(this.href,'mywindow','width=920,height=700,resizable=yes,location=no,scrollbars=yes'); return false;"><img src="http://www.adctoday.com/sites/default/files/embed_button.png"></a>