Discover gists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { izumi, PREFIX, mode, getJson } = require("../lib/"); | |
const config = require("../config"); | |
izumi ({ | |
pattern: "alive", | |
fromMe: mode, | |
desc: "Bot alive response with interactive buttons.", | |
type: "info" | |
}, async (message, match, client) => { | |
const vcardMessage = { |
This is a collection of coding patterns I have learned to solve not only some of the most common problems, but the 14 patterns (yes, there are way more than 14, but the point here is taking 6 months of preparation and condensing it into a 30 minute read that would not take more than 1-2 weeks to master. I have found these problems and patterns to be the most useful in that the data structures and algorithms are used in many other problems and become familiar over time. Good luck!
Please feel free to comment if you got some value or find any errors!
Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function keys(o) | |
local len = #o | |
local skeys = {} | |
local ukeys = {} | |
local n = 1 | |
for k,v in pairs(o) do | |
local nk = math.tointeger(k) | |
if nk == nil or nk <= 0 or nk > len then | |
local sk = tostring(k) | |
if type(k) == "string" then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk | |
index 18f8b0bbfc..4ef3e230e4 100644 | |
--- a/builddefs/common_features.mk | |
+++ b/builddefs/common_features.mk | |
@@ -878,6 +878,10 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes) | |
endif | |
endif | |
+ifeq ($(strip $(APPLE_FN_ENABLE)), yes) | |
+ OPT_DEFS += -DAPPLE_FN_ENABLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [[ $(id -u) -eq 0 ]]; then | |
echo "This script cannot be run as root, root access will be requested through \`sudo\`" | |
exit 1 | |
fi | |
user="$USER" | |
group="$user" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- After making changes, ALWAYS make sure to start up a new server so I can test it. | |
- Always look for existing code to iterate on instead of creating new code. | |
- Do not drastically change the patterns before trying to iterate on existing patterns. | |
- Always kill all existing related servers that may have been created in previous testing before trying to start a new server. | |
- Always prefer simple solutions | |
- Avoid duplication of code whenever possible, which means checking for other areas of the codebase that might already have similar code and functionality | |
- Write code that takes into account the different environments: dev, test, and prod | |
- You are careful to only make changes that are requested or you are confident are well understood and related to the change being requested | |
- When fixing an issue or bug, do not introduce a new pattern or technology without first exhausting all options for the existing implementation. And if you finally do this, make sure to remove the old implementation afterwards so we d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Need to copy an entire folder from one Google Drive account to another Google Drive account? | |
* 1. Right-click on original folder in Google Drive | |
* 2. Share with the destination Google account | |
* 3. Go into destination account's Google Drive | |
* 4. Find the shared folder under "Shared with me" | |
* 5. Select all the files (Ctrl-A / Cmd-A) | |
* 6. Right-click, Make a copy | |
* 7. Create a New Folder in destination account's Google Drive | |
* 8. Go to Recent | |
* 9. Select all recently copied files and move to the new folder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go to github | |
Create new repository [don't need to initialize with the readme (can add later)] | |
Go to R Studio | |
File -> New Project -> Version Control -> Git | |
Ctrl+V repository URL from GitHub | |
File -> New -> Markdown, enter Title, etc. | |
In the Markdown window, change "output=html_document" to "output=github_document" | |
Knit the document for the first time, will prompt you to save | |
Save as Title.rmd | |
In the "git" tab of the R studio Environment window, you will notice that the knit produced: |
NewerOlder