This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { redirect } from 'next/navigation' | |
async function fetchPage(slug) { | |
const res = await fetch('https://...') | |
if (!res.ok) return undefined | |
return res.json() | |
} | |
export default async function CampaignPage({ slug }) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Array of tweets | |
var tweets = ["Tweet 1","Tweet 2","Tweet 3"]; | |
var url = "https://twitter.com/intent/tweet?text="; | |
var tweet = tweets[Math.floor(Math.random() * tweets.length)]; | |
var content = encodeURIComponent(tweet); | |
window.location.href = url + content; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
console.log('something'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const foo = () => { | |
return( | |
<Foo name='hello'> | |
<p>blah</p> | |
</Foo> | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<!--This requires a bitsalad URL (www.bitsalad.co) for your instagram feed, and append ?callback=_i to the URL.--> | |
<div id='instagram-feed'></div> | |
<script> | |
(function(a,b,c,d){ | |
var $ = b.getElementById('instagram-feed'); | |
a['_i'] = function(d){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "* Updating system" | |
apt-get update | |
apt-get -y upgrade | |
echo "* Installing packages" | |
apt-get -y install build-essential libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop | |
id -u deploy &> /dev/null | |
if [ $? -ne 0 ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
font-size: 14px; | |
color: white; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var thing; // thing has global scope now. | |
$(document).ready(function(){ | |
thing = "AGGGFSDGS";} | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# What is the name of the app? | |
NAME=$1 | |
# Make directory structure | |
mkdir -p $NAME/{lib/$NAME,spec/lib/$NAME} | |
cd $NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Eli Perelman http://eliperelman.com | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
NewerOlder