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 | |
| echo "lgtm 👍" |
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 crypto = require('crypto'); // Standard nodejs library. Tested using v10.15.0 and v8.11.4 | |
| const sparkcentralSecret = process.env['SECRET']; // shared secret as on settings | |
| const expectedSignature = "1d051f7bfd06c7a3702788bb38bbb967109b5389c1f25af4909d0cb7d75d096d"; // take from request header. | |
| const body = ` | |
| { | |
| "email": "[email protected]" | |
| } |
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
| #!/usr/bin/env osascript -l JavaScript | |
| ObjC.import('stdlib') | |
| function run(argv) { | |
| const [newSettingSetName, ...commandArray] = argv; | |
| const app = Application("Terminal"); | |
| const oldSettingsName = app.windows[0].selectedTab.currentSettings.name(); | |
| setSettingSet(app, newSettingSetName); | |
| if (commandArray.length) { |
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
| function filter<T, K extends keyof T>(obj : T, keys : [K], value: any) : boolean { | |
| return keys.some(key => obj[key] === value); | |
| } | |
| let person = { | |
| name: "bos", | |
| firstName: "jos" | |
| } | |
| filter(person, ['firstName', "namee"], "jos"); |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Reflection; | |
| using Xunit; | |
| namespace Tjoelala | |
| { | |
| public class Person |
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
| using System.Collections.Generic; | |
| using System.Linq; | |
| using HtmlElements; | |
| using HtmlElements.Elements; | |
| using HtmlElements.Extensions; | |
| using NUnit.Framework; | |
| using OpenQA.Selenium; | |
| using OpenQA.Selenium.Firefox; | |
| using OpenQA.Selenium.Support.PageObjects; |
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
| function createTestPerson(override) { | |
| var defaultPerson = { | |
| id: 1, | |
| firstname: 'Bert', | |
| lastname: 'Macklin' | |
| } | |
| return _.merge(defaultPerson, override); | |
| } | |
| var person1 = createTestPerson(), |
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
| let handler = { | |
| get(target,name) { | |
| return `Hello ${name}` | |
| } | |
| } | |
| let obj = new Proxy({},handler); | |
| obj.world // Hello world |
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
| from flask import Flask, jsonify, request | |
| app = Flask(__name__) | |
| @app.route("/api/users") | |
| def users(): | |
| return jsonify(users = [ | |
| { | |
| "firstname":"Joske", | |
| "lastname": "Vermeulen" |
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
| new Ext.Map({ | |
| useCurrentLocation: true, | |
| listeners: { | |
| maprender : function(comp, map){ | |
| var marker = new google.maps.Marker({ | |
| position: map.center, | |
| title : 'testing', | |
| map: map | |
| }); | |
| } |
NewerOlder