carbonate
carbonate copied to clipboard
Feel free to create tickets in this repository to experiment with the Action
This repository also uses the action so you can get a taste of how it works to help with your decision on installing the Action or not.
Feel free to create random tickets. If anything needs my attention, please @ tag me and I will take a look else I shall ignore your experiments : )
Test sample code:
View raw code
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})
Reference http://expressjs.com/en/starter/hello-world.html
How about now:
View raw code
export default function truncate(str, length = 100, ending = '...') {
if (str.length > length) {
return str.substring(0, length - ending.length) + ending;
}
return str;
}
Hey check out this solution.
View raw code
export default function truncate(str, length = 100, ending = '...') {
if (str.length > length) {
return str.substring(0, length - ending.length) + ending;
}
return str;
}
Hmm, let me try PHP code without putting PHP in markdown ...
View raw code
<?php
echo rand(10, 100);
?>
Edit: Hmm... Seems like the picture is too big for short code like this?
Good Job!
View raw code
why
WHY
View raw code
What's the need for this?
So - one use case is for mobile devices. When viewing the github issue on mobile, you will have to scroll the code blocks, which is not a good user experience.
Instead, if you replace the code blocks with an image of the code, it becomes easier to read it - you can easily zoom in and out and move the image around to read it instead of scrolling...
This action won't check if you have really entered code in your code blocks... :wink:
Where was this posted btw? Just want to know why the sudden traffic :smile:
Github posted: https://twitter.com/github/status/1489284307986305033?s=20&t=dznP0i6PgD-kWvKgY4AXvQ
Where was this posted btw? Just want to know why the sudden traffic 😄
Have a guess ? https://twitter.com/github/status/1489284307986305033 😆
Oh neat!
Where was this posted btw? Just want to know why the sudden traffic :smile:
On LinkedIn too! :D
I'm inserting a code block too, cuz why not?!
View raw code
System.out.println("Carbonate is cool!! Excited to try it out");
lemme see it in action :)
View raw code
public class Cool
{
public string Staff { get; set; }
}
Cool cool = new();
cool.Staff = "Carbonate";
🐫
View raw code
.--' |
/___^ | .--.
) | / \
/ | /` '.
| '-' / \
\ | |\
\ / \ /\|
\ /'----`\ /
||| \\ |
((| ((|
||| |||
//_( //_(
If this works, it'll be very happy
View raw code
for i in range(100):
print("Hello, World")
print("Goodbye, World")
Hey
View raw code
def main():
print("Good")
View raw code
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello_world():
return "<p>Hello, World!</p>"
View raw code
print("Salom, Dunyo!")
Hi @callmekatootie, this is a really cool thing. I wonder why it added ;
to this code?
@yakhyo the code runs through prettier - which added the semicolon.
Testing char support:
View raw code
العربية
Türkçe
中文
አማርኛ
မြန်မာ
View raw code
public enum ChemicalValues {
OXYGEN("oxygen", 0xFFFFFFFF, 0, 90.19F, -1_141), HYDROGEN("hydrogen", 0xFF6CE2FF, 0, 20.28F, -70.85F),
LIQUID_HYDROGEN("liquid_hydrogen", 0xFF898FFF, 0, 20.28F, 70.85F);
private final String name;
private final int color;
private final int luminosity;
private final float temperature;
private final float density;
/**
* @param name The name of the chemical
* @param color Visual color in ARGB format
* @param luminosity Luminosity
* @param temperature Temperature in Kelvin that the chemical exists as a liquid
* @param density Density as a liquid in kg/m^3
*/
ChemicalValues(String name, int color, int luminosity, float temperature, float density) {
this.name = name;
this.color = color;
this.luminosity = luminosity;
this.temperature = temperature;
this.density = density;
}
public String getName() { return name; }
public int getColor() { return color; }
public float getTemperature() { return temperature; }
public float getDensity() { return density; }
public int getLuminosity() { return luminosity; }
}
Does Python code get formatted correctly?
View raw code
# This is a comment
def main():
print("Hello, World")
So non javascript, like php or python - you would need to add plugins to prettier to format the code properly... Perhaps I should support defining your own plugins for prettier to use - that way I don't have to capture them all and yet owners can use the action for their specific language :thinking:
That would be a pretty neat feature!