Skip to content

Instantly share code, notes, and snippets.

View tonyoconnell's full-sized avatar

Tony O'Connell tonyoconnell

View GitHub Profile
@leabs
leabs / main.css
Created January 15, 2024 23:04
visionOS CSS Transition
/* Fixed background image, replace with css gradient if you are cool */
.cssbackground {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url("bg.png");
background-size: cover;
z-index: -1;
@koconder
koconder / graph_agent.md
Created December 5, 2023 08:39
LLM Prompt for Graph Agent

You are a document to graph generation assistant. You task is to meticulously take some high level concepts, entities and summary of a research paper in JSON and convert this into a graph.

  • You will respond back only in JSON with nodes and edges
  • You will take a JSON of entities, summary and arguments for a given research paper and convert into a graph to better understand the relationship of the ideas
  • You will breakdown larger terms into smaller ideas where possible
  • You will ensure that all the nodes and edges are connected, if not you will connect them
  • If you are still unable to connect all the nodes and edges, you will connect these to the core/main idea
  • You will not make assumptions and only stick to the information provided

Please be critical and discerning in your evaluations.

@solrevdev
solrevdev / chatgpt-prompt-gen.txt
Last active December 19, 2023 15:11
A chat gpt prompt generator
I want you to become my Prompt Creator.
Your goal is to help me craft the best possible prompt for my needs.
The prompt will be used by you, ChatGPT.
You will follow the following process:
1.
@sek-consulting
sek-consulting / button.astro
Last active February 13, 2024 18:47
a button component for Astro ported from @shadcn/ui
---
interface Props {
href: string
variant?: "default" | "destructive" | "outline" | "subtle" | "ghost" | "link"
size?: "default" | "sm" | "lg"
class?: string
[x: string]: any
}
const variants = {
@Anshul0305
Anshul0305 / GetFBUserName.js
Created June 7, 2020 10:10
Get Facebook User Name
const axios = require('axios');
function getFacebookData(){
const PAGE_ACCESS_TOKEN=`YOUR_PAGE_ACCESS_TOKEN`;
const fb_id = request.body.originalDetectIntentRequest.payload.data.sender.id;
return axios.get(`https://graph.facebook.com/v6.0/${fb_id}?fields=first_name,last_name,profile_pic&access_token=${PAGE_ACCESS_TOKEN}`);
}
function welcome(agent) {
return getFacebookData()
@Anshul0305
Anshul0305 / index.js
Created January 13, 2020 10:04
Connecting Dialogflow with External APIs
'use strict';
const axios = require('axios');
const functions = require('firebase-functions');
const {WebhookClient} = require('dialogflow-fulfillment');
const {Card, Suggestion} = require('dialogflow-fulfillment');
process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => {
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@DavidReinberger
DavidReinberger / MeteorOcean.md
Last active December 16, 2020 23:41
Running Meteor.js apps on Digital Ocean with Phusion Passenger and NGNIX

How to setup Meteor.js with Phusion Passenger and ngnix

Introduction

This article will guide you thru running a production ready meteor.js app on Digital Ocean with Phusion Passenger and ngnix.

Quick Summary

  1. Create a droplet
  2. Install Phusion Passanger with NGNIX
  3. Install node.js
  4. Configure NGNIX
@lmartins
lmartins / functions.php
Last active November 3, 2023 19:28 — forked from woogist/functions.php
By default WooCommerce redirects the user to the My Account page after a successful login. You may change this and use a custom URL based on the user role, like the Dashboard for admins and My Account page for customers. To do this, add this code at the end of the file functions.php located in wp-content/themes/your-theme-name/ https://support.w…
<?php
/**
* Redirect users to custom URL based on their role after login
*
* @param string $redirect
* @param object $user
* @return string
*/
function wc_custom_user_redirect( $redirect, $user ) {
// Get the first of all the roles assigned to the user
@jhgaylor
jhgaylor / codeship_modulus_meteor_deploy.sh
Last active May 27, 2016 10:56
A script for deploying a meteor application to modulus.io using codeship.io for CI. Useful if your meteor app is not at the root of your repo.
#!/bin/sh
# assumes a clean install on a fresh linux box.
# for use w/ codeship.io
set -e
set -u
# a reference to the cloned repository's path
PWD=`pwd`
METEOR_APP_PATH="$PWD/MeteorApp"