Discover gists
View randomSketcher.pyde
z1 = 750 | |
z2 = 500 | |
ai = [z1,z2] | |
ai2 = [z1,z2] | |
a = [10,10,10] | |
a2 = [10,10,10] | |
def setup(): |
View build.sh
debootstrap bullseye ./debian-bullseye # download and create rootfs download | |
tar cf debian-bullseye.tar -C ./debian-bullseye/ . # tar | |
podman import debian-bullseye.tar debian-bullseye # import with name | |
podman run -it debian-bullseye /bin/bash # run bash in named container |
View index.js
class CometChatMessages extends React.PureComponent { | |
... | |
messageSent = messages => { | |
const message = messages[0]; | |
const messageList = [...this.state.messageList]; | |
let messageKey = messageList.findIndex(m => m._id === message._id); | |
if (messageKey > -1) { | |
const newMessageObj = { ...message }; | |
const transformedMessage = this.messageListRef.transformSingleMessage(newMessageObj); |
View untrusted-lvl3-solution.js
/************************ | |
* validationEngaged.js * | |
************************ | |
* | |
* They're really on to us now! The validateLevel function | |
* has been activated to enforce constraints on what you can | |
* do. In this case, you're not allowed to remove any blocks. | |
* | |
* They're doing all they can to keep you here. But you | |
* can still outsmart them. |
View .py
publisher = pubsub_v1.PublisherClient() | |
# project = args.project | |
event_type = publisher.topic_path(project,TOPIC) | |
try: | |
publisher.get_topic(event_type) | |
except: | |
publisher.create_topic(event_type) | |
while True: | |
message, key = make_order(i) |
View untrusted-lvl2-solution.js
/******************** | |
* theLongWayOut.js * | |
******************** | |
* | |
* Well, it looks like they're on to us. The path isn't as | |
* clear as I thought it'd be. But no matter - four clever | |
* characters should be enough to erase all their tricks. | |
*/ | |
function startLevel(map) { |
View statemachine.json
{ | |
"Comment": "This is your state machine", | |
"StartAt": "StartPipeline", | |
"States": { | |
"StartPipeline": { | |
"Type": "Task", | |
"Parameters": { | |
"Name": "aws-devops-demo" | |
}, | |
"Resource": "arn:aws:states:::aws-sdk:codepipeline:startPipelineExecution", |
View nested.dart
List<GoRoute> buildRoutes() { | |
return GoRoute( | |
path: '/', | |
routes: [ | |
buildTaskRoute(), | |
buildNotificationRoute(), | |
] | |
) | |
} |
View crop-vector-images-without-crop-to-raster.cs
using Aspose.Imaging; | |
using Aspose.Imaging.FileFormats.Emf; | |
using Aspose.Imaging.FileFormats.Tiff.Enums; | |
using Aspose.Imaging.ImageOptions; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
List<string> formats = new List<string>() { "svg", "eps" }; |
View index.js
... | |
showToastForMentionMessage = (message) => { | |
if (message.text.includes(`@${this.state.loggedInUser.name}`)) { | |
const toastMessage = `You was tagged by ${message.sender.name}`; | |
this.context.setToastMessage("success", toastMessage); | |
} | |
} | |
//callback for listener functions | |
messageUpdated = (key, message, group, options) => { |
NewerOlder