Skip to content

Instantly share code, notes, and snippets.

@loredonrj
loredonrj / settings.py
Created May 19, 2023 05:34 — forked from tuchanemo/settings.py
mysql django setting
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'firstsql_db',
'USER': 'root',
'PASSWORD': '',
'HOST':'127.0.0.1',
'PORT':'3306',
'OPTIONS': {
'autocommit': True,
@loredonrj
loredonrj / Auto Fill a Google Doc Template from Google Sheet Data
Created March 12, 2023 07:21
Auto Fill a Google Doc Template from Google Sheet Data with Google Apps Script
function onOpen() { /* this function will run when Google Sheets (Gsh) loads, it is a trigger to allow us to add a menu to the Gsh UI */
const ui = SpreadsheetApp.getUi(); /* returns an instance of the Gsh UI that we can use to add a menu to our Gsh UI */
const menu = ui.createMenu('AutoFill Docs'); /* creates the 'Autofill Docs' menu label */
menu.addItem('Create new docs','createNewGoogleDocs'); /* creates the 'Create new docs' menu item */
menu.addToUi(); /* adds the menu and the menu label to Gsh UI */
}
function createNewGoogleDocs() { /* will loop through the Gsh rows and generate a new Gdoc if the Document Link Column is empty */
const googleDocTemplate = DriveApp.getFileById('1UPn9oGcibQ-17fFSVHncGHpS4-8d-Nk_c_Nj-mhk34o'); /* get the spreadsheet Id */
const destinationFolder = DriveApp.getFolderById('1mXE3

Managing Gists Locally

by Danny Quah, May 2020

Through the Embed instruction or plugin, Gist snippets on GitHub can conveniently provide posts on Medium, WordPress, and elsewhere supplementary information (lines of code, images, Markdown-created tables, and so on). But while Gist snippets on GitHub can be managed directly via browser or through something like [Gisto][], a user might also wish to manipulate them offline. This last is for many of the same reasons that a user seeks to clone a git repo to their local filesystem, modify it locally, and then only subsequently push changes back up to GitHub.

Here's how to do this:

Create the gist on GitHub and then clone it to your local filesystem:

@loredonrj
loredonrj / $Shiffman.Youtube.Processing4.sketches.md
Last active September 6, 2021 04:06
Shiffman.Youtube.Processing4.sketches

Shiffman Youtube Processing4 sketches Gists

@loredonrj
loredonrj / App.java
Last active September 6, 2021 04:16
CaveOfProgramming.com.Complete.Beginner.28.Interfaces
public class App{
//test
public static void main(String[] args) {
Machine machine1 = new Machine();
machine1.start();
Person person1 = new Person("Lily");
person1.greet();