Skip to content

Instantly share code, notes, and snippets.

View degrammer's full-sized avatar
Coding Runme DevOps Notebooks for VS Code

Ruben Restrepo degrammer

Coding Runme DevOps Notebooks for VS Code
View GitHub Profile
Progress: [##########>-------------------------------------------------] 16/95 (15.8 %)
⚠️  Compiling of exercises/primitive_types/primitive_types1.rs failed! Please try again. Here's the output:
error: expected identifier, found keyword `if`
  --> exercises/primitive_types/primitive_types1.rs:16:5
   |
16 |     if is_evening {
   |     ^^ expected identifier, found keyword

error: expected one of `:`, `;`, `=`, `@`, or `|`, found `is_evening`
> raicers-api@1.0.0 typeorm:validate
> npm run typeorm schema:log


> raicers-api@1.0.0 typeorm
> node --require ts-node/register ./node_modules/typeorm/cli.js -d ./src/ormconfig.ts schema:log

----------------------------------------------------------------

File name: README.md

Session: 01HZ50EFYD8SQKGYQFJTJZ154T


▶️ Generated by Runme

Share your own terminal sessions, it's free and open source. Click here to learn more.

File name: shebang.md

Session: 01HWE53MJN9GNBSRK5NY7V0JAX


▶️ Generated by Runme

Share your own terminal sessions, it's free and open source. Click here to learn more.

@degrammer
degrammer / index.js
Created January 23, 2024 22:39
endojs test
#!/usr/bin/env node
import "@endo/init";
const isFrozen = o => Object.isFrozen(o);
const mathCompartment = new Compartment({ Math, print: console.log });
mathCompartment.evaluate(`
const result = Math.pow(2, 5);
@degrammer
degrammer / index.js
Last active January 19, 2024 21:59
quick server
#!/usr/bin/env node
const http = require('http');
const url = require('url');
const server = http.createServer((req, res) => {
const parsedUrl = url.parse(req.url, true);
const queryStringParams = parsedUrl.query;
res.writeHead(200, {'Content-Type': 'text/plain'});
@degrammer
degrammer / .gitconfig
Created July 11, 2023 17:26
Git productivity configuration
# This is Git's per-user configuration file.
# Use this git configuration file to use some handy commands in your day-to-day work
[user]
name = <YOUR NAME HERE>
email = <YOUR EMAIL HERE>
[alias]
wip = !read -p \"Enter issue number: \" issue && read -p \"What feature are you working on?:\" name && git checkout -b \"wip/bencho/$issue-$name\"
ready = !git branch -m \"$(git branch --show-current | sed \"s/wip\\///g\")\"
copy = !git branch --show-current | pbcopy
alias = !git config --get-regexp alias
@degrammer
degrammer / discord-gspreadsheet-integration.js
Last active June 26, 2023 19:53
Google Spreadsheet + Discord Bot
const { Integration } = require('@fusebit-int/framework');
const integration = new Integration();
// Koa Router: https://koajs.com/
const router = integration.router;
const googleConnectorName = '{{GOOGLE CONNECTOR NAME HERE}}';
const discordConnectorName = '{{DISCORD CONNECTOR NAME HERE}}';
const spreadsheetId = '{{ID OF THE SPREADSHEET}}'
const discordChannelId = '{{DISCORD CHANNEL ID TO CREATE THE THREADS}}'
@degrammer
degrammer / slash-command.js
Created January 19, 2022 16:40
GitHub Linear slash command
integration.event.on('/:componentName/webhook/issue_comment.created', async (ctx) => {
const {
data: { comment, repository, issue, installation },
} = ctx.req.body.data;
const commentText = comment.body;
const isLinearCommand = commentText.match(/^\/linear/g).length > 0;
if (isLinearCommand) {
const linearClient = await integration.service.getSdk(ctx, 'popular-js-linear', ctx.req.body.installIds[0]);
const [titlePart, description] = commentText.split('\n');
const title = titlePart.replace('/linear', '');
module.exports = (url) => {
console.log(url.replace(/ /g, '').replace(/\n│/g,''));
};