⌘⌃P | Type ‘show’ to see the list. |
NOTE | Creates a note. |
TODO | Creates a ToDo. |
FIXME | Flags something as a bug. |
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
# install | |
brew install nginx | |
#Add nginx to the path | |
#set up sites-available, sites-enabled | |
cd /usr/local/etc/nginx/ | |
mkdir sites-available sites-enabled | |
#make sure that the primary nginx config file has included the sites-enabled dir |
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
server { | |
listen 80; | |
server_name www.domain1.com; | |
rewrite ^/(.*) http://domain1.com/$1 permanent; | |
} | |
server { | |
listen 80; | |
server_name domain1.com; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
-------------------------------------------------------------------- | |
-- Queries related to distribution of metadata. | |
-- Find the number of users per profile. | |
SELECT count(id), Profile.name | |
FROM User | |
WHERE User.IsActive = true | |
GROUP BY Profile.name | |
-- Find the distribution of Apex classes per namespace. | |
select count(id), NameSpacePrefix |
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
<script type="text/javascript"> | |
RED.nodes.registerType('NODE_NAME',{ | |
category: 'The Category', | |
color: '#C0DEED', | |
defaults: { | |
}, | |
inputs: 1, | |
outputs: 1, | |
icon: "file.png", | |
label: function() { |
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
//Find an entity's prefix | |
String prefix = MyObjectType.SObjectType.getDescribe().getKeyPrefix(); | |
System.debug(prefix); | |
class PrefixFinder{ | |
public String findObjectName(String recordIdOrPrefix){ | |
String objectName = ''; | |
try{ | |
String providedPrefix = String.valueOf(recordIdOrPrefix).substring(0,3); | |
Map<String, Schema.SObjectType> allObjectsTypes = Schema.getGlobalDescribe(); |
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
import java.util.Scanner; | |
public class ArrayExamples { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
final int N = 2; | |
final int M = 2; | |
final int P = 3; | |
additionExample(N, M, input); |
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
############################################################################### | |
# This script converts a Quicktime MOV file into an animated GIF. | |
# Based on: https://abitawake.com/news/articles/how-we-make-gifs-for-twitter | |
# | |
# Dependencies | |
# - ffmpeg | |
# - gifsicle | |
# | |
# Usage | |
# ./mov_to_gif.sh a_movie.mov new_gif.gif |
This document is a collection of performance benchmarks that compare the performance of mathmatical operations on the Python numeric types int, float, Decimal, and Fraction. Benchmarks were done using the Python package pytest-benchmark.
The benchmark was run on July 5th, 2024.
See this article for the rationale of why I did this. The benchmarks were run on a machine with the following specs.
OlderNewer