This file contains 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
type error interface { | |
Error() string | |
} |
This file contains 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
function purge() { | |
var promotions = GmailApp.search("category:promotions") | |
for (var i = 0; i < promotions.length; i++) { | |
Gmail.Users.Threads.remove('me', promotions[i].getId()) | |
} | |
var forums = GmailApp.search("category:forums") | |
for (var i = 0; i < forums.length; i++) { | |
Gmail.Users.Threads.remove('me', forums[i].getId()) | |
} |
This file contains 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
package main | |
import ( | |
"fmt" | |
"reflect" | |
"time" | |
) | |
type TimeStamp struct { | |
T time.Time |
This file contains 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 setup> | |
import { ref } from 'vue' | |
import CustomInput from './CustomInput.vue' | |
const messages = ref([]) | |
messages.value.push({channel: { title: "Jarrod Roberson"}}) | |
messages.value.push({channel: { title: "Julian Roberson"}}) | |
messages.value.push({channel: { title: "Sebastian Roberson"}}) | |
messages.value.push({channel: { title: "Valentino Roberson"}}) |
This file contains 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
/* | |
* It becomes painfully obvious why this pattern is NOT embraced by the Go community. | |
* Just to be painfully clear, DO NOT DO THIS! | |
*/ | |
package main | |
import ( | |
"fmt" | |
) |
This file contains 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
; program start | |
Start | |
jsr $FF81 ; CINT (clear screen) | |
sei ; turn off interrupts | |
ldy #0 | |
sty $d020 ; reset border color | |
Loop | |
lda Message,y ; load message byte | |
beq EOM ; 0 = end of string | |
clc |
This file contains 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 needed modules | |
import os | |
import time | |
import re | |
# Regular Expression to validate that the input is in the expected format! | |
inputPattern = re.compile('^\d{1},\d{1}$') | |
#Initialize a 2D array to represent the board using a SPACE to represent unclaimed cells. | |
board = [[' ' for x in range(3)] for y in range(3)] |
This file contains 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
public static final Ordering<SubCategory> NATURAL_ORDER; | |
static | |
{ | |
NATURAL_ORDER = new Ordering<SubCategory>() { | |
@Override | |
public int compare(@Nullable final SubCategory left, @Nullable final SubCategory right) | |
{ | |
return ComparisonChain.start() | |
.compare(checkNotNull(left).categoryId, checkNotNull(right).categoryId) |
This file contains 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
alias ll='ls -lha --color=always' | |
alias subl='subl --touch --cygstart --' |
This file contains 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
String.prototype.format = function() { | |
var self = this, | |
formats = self.match(/{(:?\d*)}/g), // an array of formats `{}` found in the string | |
counter = 0, // A counter to keep track of what index to replace with | |
args = arguments; // Dereferencing arguments for use in the nested code blocks | |
if (formats) { | |
formats.forEach(function(format) { // We loop through each format expression in the array | |
var namedMatch = format.match(/{:(\d+)}/), // Checking if the format is a named replacement (i.e. {:1}) | |
reg; |
NewerOlder