Skip to content

Instantly share code, notes, and snippets.

@valorad
valorad / fedora-LXQT-install-xrdp.md
Last active June 5, 2022 13:19
Fedora LXQT set up Remote Desktop (xrdp)
@perrygovier
perrygovier / file-input.less
Created December 7, 2021 18:00
fix for safari file-selector-button
[type="file"] {
&::file-selector-button {
display: none;
}
// Safari only
@media not all and (min-resolution:.001dpcm) {
@supports (-webkit-appearance:none) {
text-indent: -120px;
margin-left: -7em;
@guv3n
guv3n / tooltip-colors.css
Created July 16, 2019 12:05
Change the color of backbone 4 tooltips according to a data-attribute
.tooltip-warning .tooltip-inner {background-color: #ffc107;}
.tooltip-warning.bs-tooltip-auto[x-placement^=top] .arrow::before, .tooltip-warning.bs-tooltip-top .arrow::before {border-top-color: #ffc107;}
.tooltip-warning.bs-tooltip-auto[x-placement^=right] .arrow::before, .tooltip-warning.bs-tooltip-right .arrow::before {border-right-color: #ffc107;}
.tooltip-warning.bs-tooltip-auto[x-placement^=bottom] .arrow::before, .tooltip-warning.bs-tooltip-bottom .arrow::before {border-bottom-color: #ffc107;}
.tooltip-warning.bs-tooltip-auto[x-placement^=left] .arrow::before, .tooltip-warning.bs-tooltip-left .arrow::before {border-left-color: #ffc107;}
.tooltip-danger .tooltip-inner {background-color: #dc3545;}
.tooltip-danger.bs-tooltip-auto[x-placement^=top] .arrow::before, .tooltip-danger.bs-tooltip-top .arrow::before {border-top-color: #dc3545;}
.tooltip-danger.bs-tooltip-auto[x-placement^=right] .arrow::before, .tooltip-danger.bs-tooltip-right .arrow::before {border-right-color: #dc3545;}
.tooltip-danger.bs-too
@tanaikech
tanaikech / submit.md
Last active March 20, 2024 04:21
Upload Files to Google Drive using Javascript

Upload Files to Google Drive using Javascript

News

At October 11, 2019, I published a Javascript library to to run the resumable upload for Google Drive. When this is used, the large file can be uploaded. You can also use this js library.

Description

This is a sample script for uploading files to Google Drive using Javascript. The files are uploaded by Drive API v3. gapi.client.drive.files.create() can create an empty file on Google Drive. But it cannot directly upload files including contents. I think that this might not be able to upload files and metadata with the multipart/related, although this might be resolved by the future update. So now, as one of workarounds, I use using XMLHttpRequest.

  • This sample uses gapi.
  • Before you use this, please enable Drive API at API console and carr
package main
import (
"context"
"fmt"
"net"
"os/exec"
"strconv"
"strings"
"sync"
@polevaultweb
polevaultweb / ssl.sh
Created January 31, 2018 07:16
Easily create local SSL certificates for development sites that work with you own Certificate Authority https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/
#!/bin/sh
if [ "$#" -ne 1 ]
then
echo "Usage: Must supply a domain"
exit 1
fi
DOMAIN=$1
/* file:///Users/henryhuman/Documents/04_Business/Bootstrap%20Creative/GitHub%20repositories/bootstrap-classes-list/bootstrap4.5.0.html */
.accordion
.active
.alert
.alert-danger
.alert-dark
.alert-dismissible
.alert-heading
.alert-info
@craigtp
craigtp / GetWindowsProductKey.vbs
Created May 30, 2016 18:10
Retrieve Windows Product Key
Option Explicit
Dim objshell,path,DigitalID, Result
Set objshell = CreateObject("WScript.Shell")
'Set registry key path
Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
'Registry key value
DigitalID = objshell.RegRead(Path & "DigitalProductId")
Dim ProductName,ProductID,ProductKey,ProductData
'Get ProductName, ProductID, ProductKey
@evantahler
evantahler / email.js
Last active July 23, 2020 18:21
simple sending email service in actionhero
var nodemailer = require('nodemailer');
module.exports = {
initialize: function(api, next){
api.email = {
transporter: nodemailer.createTransport('smtps://user%40gmail.com:pass@smtp.gmail.com'),
send: function(to, subject, body, callback){
var payload = {
from: '"Fred Foo 👥" <foo@blurdybloop.com>',
@blinksmith
blinksmith / golang.udl.xml
Last active April 18, 2024 08:53
Notepad++ Syntax Highlight for Go
<NotepadPlus>
<UserLang name="Golang" ext="go" udlVersion="2.1">
<!--
NPP Syntax Highlight for Go
using most used color in NPP for Golang.
Author: blinksmith Version: 0.1.3
Last tested in Notepad++ v7.5.9
Quick start :
Method 1