-
Find the Discord channel in which you would like to send commits and other updates
-
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
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 datetime | |
import time | |
import urllib2 | |
def log(s, ts=None): | |
ts = datetime.datetime.now() | |
print ts.strftime("%H:%M:%S ") + s | |
def main(): | |
last_state_change = 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
<tt>reviewForm.$valid = {{ 'reviewForm.$valid' }}</tt> | |
<ul> | |
<li ng-repeat="(key, errors) in reviewForm.$error track by $index"> <strong>{{ 'key' }}</strong> errors | |
<ul> | |
<li ng-repeat="e in errors">{{ e.$name }} has an error: <strong>{{ key }}</strong>.</li> | |
</ul> | |
</li> | |
</ul> |
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 * as models from "models"; | |
import fs from "fs"; | |
for(let model in models) { | |
let attributes = models[model].attributes; | |
for(let column in attributes) { | |
delete attributes[column].Model; | |
delete attributes[column].fieldName; |
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
var Luhn = { | |
// length of our number (check digit included) | |
length: 10, | |
pow2: [0, 2, 4, 6, 8, 1, 3, 5, 7, 9], | |
// compute check digit | |
checksum: function (x) { | |
var sum = 0; | |
var n; | |
var odd = false; | |
for (var i = x.length - 1; i >= 0; --i) { |
In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
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 React, { PropTypes, Component } from 'react' | |
import { | |
Animated, | |
ScrollView, | |
Text, | |
View, | |
} from 'react-native' | |
import EStyleSheet from 'react-native-extended-stylesheet' | |
const styles = EStyleSheet.create({ |
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
const AuditLog = auditLogDb.define('audit-log', { | |
userId: { | |
type: Sequelize.DataTypes.INTEGER, | |
allowNull: true, | |
}, | |
actionType: { | |
type: Sequelize.DataTypes.STRING, | |
allowNull: false, | |
}, | |
table: { |
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 { Connection, EntitySubscriberInterface, getMetadataArgsStorage, Repository, UpdateEvent } from 'typeorm'; | |
import { Injectable } from '@nestjs/common'; | |
import { InjectConnection, InjectRepository } from '@nestjs/typeorm'; | |
import { updatedDiff } from 'deep-object-diff'; | |
import { AuditTrailEntity } from '../entities/AuditTrailEntity'; | |
import { AuditTrailValueEntity } from '../entities/AuditTrailValueEntity'; | |
import { AuditHistoryToAuditTrailEntity } from '../entities/AuditHistoryToAuditTrailEntity'; | |
import { AuditHistoryEntity } from '../entities/AuditHistoryEntity'; | |
@Injectable() |
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
[ | |
{ "state": "Ahuachapán", "city": "Ahuachapán", "zip": "2101" , "title": "Ciudad Cabecera" , "district": "Ahuachapán", "municipality": "Ahuachapán Centro"}, | |
{ "state": "Ahuachapán", "city": "Apaneca", "zip": "2102" , "title": "Villa" , "district": "Ahuachapán", "municipality": "Ahuachapán Centro" }, | |
{ "state": "Ahuachapán", "city": "Atiquizaya", "zip": "2103" , "title": "Ciudad" , "district": "Atiquizaya", "municipality": "Ahuachapán Norte" }, | |
{ "state": "Ahuachapán", "city": "Concepción de Ataco", "zip": "2106" , "title": "Ciudad" , "district": "Ahuachapán", "municipality": "Ahuachapán Centro" }, | |
{ "state": "Ahuachapán", "city": "El Refugio" , "zip": "2107", "title": "Pueblo" , "district": "Atiquizaya", "municipality": "Ahuachapán Norte" }, | |
{ "state": "Ahuachapán", "city": "Guaymango" , "zip": "2108", "title": "Pueblo" , "district": "Ahuachapán", "municipality": "Ahuachapán Sur" }, | |
{ "state": "Ahuachapán", "city": "Jujutla" , "zip": "2109", "title": "Villa" , "district": "Ahuacha |
OlderNewer