Skip to content

Instantly share code, notes, and snippets.

@kazimunshimun
kazimunshimun / ContentView.swift
Created September 10, 2020 19:25
SwiftUI Circular Slider
//
// ContentView.swift
// TemperatureControl
//
// Created by Anik on 10/9/20.
//
import SwiftUI
struct ContentView: View {
@iamwill
iamwill / gliderecord_cheatsheet.md
Last active April 28, 2024 03:58
GlideRecord cheatsheet

GlideRecord & GlideAggregate Cheat Sheet ❗

GlideRecord(String tableName) ❗

var gr = new GlideRecord('incident'); // use the incident table
gr.query(); // fetch data from the database
while (gr.next()) { // advance
    gs.info(gr.short_description);
}
@FreddieOliveira
FreddieOliveira / docker.md
Last active April 28, 2024 03:58
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@mwhite
mwhite / git-aliases.md
Last active April 28, 2024 03:54
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 03:55
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory

A metatable can be defined like

local t = setmetatable({}, {
  __tostring = function() return 'custom tostring behavior!' end
})

Here are the metamethods that you can define, and their behavior

Operators

@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active April 28, 2024 03:53
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@Henri-lab
Henri-lab / openLayerJS.json
Created April 28, 2024 03:45
关于openLayer JS库的snippet,陆续更新,纵享丝滑~
//将以下内容放置在vscode-用户代码片段-javascript.json文件中即可使用快捷设置
// ---------------OpenLayer---------------------------
{
"openlayersMap":{
"prefix": "olM",
"body": [
"new ol.Map({",
" title: ${1:title},", // 可选标题
" target: ${2:target},", // 地图的目标元素
" view: ${3:view},", // 地图视图
@vasanthk
vasanthk / System Design.md
Last active April 28, 2024 03:48
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?