Automatically make changes to a github file - github

I’ve Made an app whith a whitelist, the withelist is on a github repo ( with just one file that is the withelist ), Each time that a user that downloads my app want to be allowed to use the app has to send me a message for be inserted in the white list. Right now this process is really slow and I want to speed it up but I’m trying to figure out how. I’m sesrching a way for
Let the users send me a message
Read the message ( with a bot or something that automate this process )
Make the bot add the user to the whitelist
I’m having some troubles to find a ‘free’ way for do it. The first ideas that came in my mind were to do it with a discord server or a Telegram group, but i didn’t find something for make the bot able to commit changes to a github file. Another problem would be that this messages are readable by all the users becouse are sent in a discord/telegram group and I want to keep them private. There is some simpler ways for do something like this?

Related

Watch for Submissions and Changes in P4

Is there a way to 'watch' for submissions to all, or a specific depot, in Perforce? I was looking at p4 reviews but I'm not sure if it's what I need.
I want to make a piece of middleware that will send a payload to an internal service whenever someone makes a submission but I need some sort of way to watch for those changes. Something like p4 changes but in real-time so a new line is printed to the terminal whenever a change is made.
What am I best off using for this?
So, the review daemon (and by extension reviews on your user) is the recommended way to watch for changes, BUT, it sounds like you want more customization here...
So, if you go down a rabbit hole too far and decide you just want basic reviews, this article: http://answers.perforce.com/articles/KB/2920 details what needs to be setup.
Having said that, a way to do this would be triggers on the server. Check out p4 triggers. You can catch a submit in several places. Before it's properly committed to the server, after it's officially committed, etc.
What you can do is setup a trigger that runs a script and either checks in a file to another part of the depot with processed payload from the changelist, or email a set of folks, whatever you want. Triggers can run arbitrary scripts (with all the security issues that can bring of course).

Sharepoint Online remote event receiver without App/Add-in

The company I work for uses SharePoint Online. We have a requirement that on most site collections, whenever a user creates a new document library that the document library is configured with the "document" content type being removed, and replaced with some of our own corporate content types.
Previously I've managed this by using a coded sandbox solution installed on relevant site collections which had an event handler that fired on "list added". It's obviously now time to move away from that solution.
I'm really struggling to get to grips with the alternative, conceptually. I'm aiming to replace the old solution with a Remote Event Receiver solution.
The way I think I'd like to achieve this:
1) Create a single remote event receiver hosted in Azure which receives details of a new list being added in a site which it then configures appropriately.
2) Use CSOM to provision the site and as part of that provisioning, hook up the event receiver.
I've spent a lot of time on this, getting nowhere. I initially thought the answer lied in using an App which I could install in the App Catalog and then push out to particular site collections but that doesn't seem to be right.
Is the solution above possible? All examples on the web I've come across of setting up remote event receivers seem to use a SharePoint app which I don't really want to do.
Thanks.
For info I found the answer. You can indeed create a remote event receiver without a SharePoint app/add-in.
The answer was written up here
I thought I needed a SharePoint Provider Hosted App for that part 1
But you should bear in mind that as per Remove event receivers on host web clientContext you will not have the client Context passed through, so
TokenHelper.CreateRemoteEventReceiverClientContext(properties)
...will come through as empty. If you want to interact with SharePoint then you'll need to find another way than this approach, or use a different set of credentials.

Open links from newly received emails automatically

is there are program or script or anything that will make my email client/webmail to open webpage links from newly received emails automatically?
If someone knows or can make a add-on for thunderbird or make this to work I don't mind paying. Just I need links that are in emails I receive to be automatically opened in default internet browser tabs.
All I can say is I very very much doubt it. If there ever was one created it would most probably be removed by most download source providers as there is a fairly huge security risk there.
Additionally, aside from the security factor you have a simple load factor to account for. I regularly make newsletters for clients, each with a link to a text version, a online version, a link for the logo and so forth... So if you did have such a plugin you would also open these links, which seams crazy. Additionally, remember the Unsubscribe link for emails, on some you are asked to confirm on others you click(/open), your taken off. Which would be very undesired.
I do understand you probably have a reason X for doing this, like because its a in house email system which creates reports and it does this and does that etc. I think most people here do understand there are sometimes very odd usage cases for things, but I don't think anyone will be able to assist you here, sorry!

Bulk message sending with publish/subscribe model

We are trying to implement a notification module. It allows website internal users to send message to each other. A key feature is that it allows business users to send bulk messages to the users. We are talking about millions of users here.
Currently it is planned to be a publish/subscribe model. Once login, system shall retrieve the relevant messages for the user from a database table. The logic gets more and more complicated when each users are allow to delete and reply to the message he/she received.
Pubsubhub seems to be more server to server. XMPP seems to be too complicated for this scenario.
Anything I miss out? Can I make it simpler? Any existing library to build on? I'm open to any suggestions.
It sounds like a database is actually all you need here. You didn't mention any need for real-time notification. If this is a web application and the user is logging in, a simple relationship between users and messages may be all you need to provide the ability to send any message to one (or millions) of users. Your relationship table can include flags for read and deleted.
One option would be to use something like Joomla.
http://www.joomla.org/
Its open source, and they've solved all the problems you are trying to solve. Alternatively if you have to build it, what language are we talking about here?
Are you seriously saying you have millions of 'internal' employees? Sounds like you might need an email server!
Seriously though, please tell us more..

Creating a constantly updating feed like Twitter

I'd like to have something in my app that is just like Twitter but not Twitter. Basically it will be a place people can submit messages and do not need an account. They only way they can submit is through the app. I want other app users to see the submitted messages nearly immediate. I believe push notification can do that sort of work but do I need push notification for this? How does Twitter do it?
-- EDIT --
After reading some of the responses, push might be what I need. People will be submitting messages to my server often. If someone is watching the feed, they might see one new message per minute depending on the query they are using. I'm thinking to go with a MySQL database, (which allows switching to cheaper non Windows servers w/o much hassle) and push notification. Are there any reasons those won't work for my scenario?
You only need push notification if you want the app to be able to receive new messages while closed.
Here's a rough description of one way to do this:
Your app sends a message via HTTP Post to your server.
Your server stores the message in a database, using the iPhones unique ID as an identifier.
Your app connects to the server frequently, asking for new messages.
If there are any new ones, the server hands the message to the app, which displays it.
This is approximately what twitter/iphone twitter apps do.
Your choices are fairly binary:
Use push notification
Use Polling
With Push Notification:
You control when you contact your users... Heavy Load means you can slow updates down to avoid taxing your infrastructure
Contrariwise, you have to push to clients that may not even be there anymore (And thus may need some sort of register model), high load may mean that clients don't get immediate update
You can leverage things like Amazon's EC2 to give you more processing power
Unless you're out of capacity, users are almost certain to be receiving updates as they happen
To pick up messages missed while offline, the SERVER needs to know what message was last successfully received, store older messages and forward many all at once
If you choose to use polling:
You must have a stable address to be polled
You need the ability to have lots of quick query connections checking for new data, then returning that data if required.
If your application becomes popular enough you may find you don't have enough resources
If your resources are taxed your application will go down, rather then just slow down
You don't need to register clients and keep track of their on/offline state
Parallelizing on the fly is a bit trickier
To pick up older messages, the CLIENT needs to know when they last received a message and then request the server send any message since that time
Both can be fast, but they come with different bandwidth and processing profiles. I prefer push for everything that's real-time.
Might want to take a look at XMPP.
Twitter doesn't really push events out to the iPhone in realtime. It's more like polling by the various clients.
If you really want instantaneous for the last mile you'll want to use push.
Twitter uses lots of servers and raid arrays to handle the load of millions of people posting 140 character messages. Twitter clients log in and request a list of updates for all of the people the user is following within a certain time frame.
Push wouldn't be a good candidate for this because it does not persist the "tweets". It is simply a notification mechanism. There is a text messaging app on the App Store (called Ping!) that relies completely on push notification for sending text messages. This seems to work fine, but if the developers are keeping track of the messages, it is all done on their servers. In their case push makes sense as you want to alert the user of a new message. In the case of a twitter clone, however, it would probably just annoy users if they got a new notification every time someone tweeted.
In the end you're better off just implementing it server side and then developing an iPhone client that logs in and retrieves the latest tweets for the people the user is following.