Skip to content

Instantly share code, notes, and snippets.

@danielwetan
danielwetan / nodejs-cicd-github-actions.md
Last active April 19, 2024 02:19
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@dbrockman
dbrockman / degrees-radians.h
Created February 12, 2013 21:52
Convert degrees <-> radians C macros
// Converts degrees to radians.
#define degreesToRadians(angleDegrees) (angleDegrees * M_PI / 180.0)
// Converts radians to degrees.
#define radiansToDegrees(angleRadians) (angleRadians * 180.0 / M_PI)
@mortcanty
mortcanty / s1multitempclass.ipynb
Last active April 19, 2024 02:12
S1MultitempClass.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@imolorhe
imolorhe / pdf2img.html
Created August 13, 2018 09:38 — forked from jdeng/pdf2img.html
pdf to image using pdf.js
<html>
<body>
<script type="text/javascript" src="//mozilla.github.io/pdf.js/build/pdf.js"></script>
<script type="text/javascript">
var url = "https://docs.google.com/document/export?format=pdf&id=1ML11ZyyMpnAr6clIAwWrXD53pQgNR-DppMYwt9XvE6s&token=AC4w5Vg7fSWH1Hq0SgNckx4YCvnGPaScyw%3A1423618416864";
var pages = [], heights = [], width = 0, height = 0, currentPage = 1;
var scale = 1.5;
function draw() {
@scriptdev
scriptdev / .php
Created November 4, 2023 21:41
ADICIONAR OPÇÕES NO TRadioGroup
<?php
$opcoes = array("A"=>"Opção A","B"=>"Opção B","C"=>"Opção C");
TRadioGroup::reload(self::$formName, 'opcoes', $opcoes);
@scriptdev
scriptdev / .php
Last active April 19, 2024 02:11
SELECIONAR TODOS OS ITENS DO TCheckGroup
<?php
TScript::create("$('input[name=\"checkbox[]\"]').prop('checked', true);"); # MARCAR
TScript::create("$('input[name=\"checkbox[]\"]').prop('checked', false);"); # DESMARCAR
@scriptdev
scriptdev / .php
Created November 11, 2023 02:46
REPETIR VALOR EM PHP
<?php
$repeticao = str_repeat("*",10);
echo $repeticao; # RETORNO: **********
@scriptdev
scriptdev / .php
Created November 13, 2023 18:16
PEGAR ARQUIVO DO TFile
<?php
$arquivo = json_decode(urldecode($param['NOME_CAMPO_TFile']))->fileName;
@scriptdev
scriptdev / .php
Created November 14, 2023 20:25
ALTERAR O RÓTULO DO BOTÃO
<?php
TScript::create('$("#btn_salvar").html("ALTERAR");');