Thanks @Yamikuronue
I removed the explicit protocol and used "//" instead it will use whatever protocol the page is loaded with.
##V2.4.js
Thanks @Yamikuronue
I removed the explicit protocol and used "//" instead it will use whatever protocol the page is loaded with.
##V2.4.js
There was probably a lot of other issues reported with back navigation, however
this one is a first for me, and I am fairly sure it worked before.
I could be wrong
expected: navigate to the previous page we previously entered( the topic)
actual: navigate to the main topics list
Also, you might want to page @Monarch as well, he's very proficient with Ember hackery.
I happened to write that code too ;) I wasn't able to produce an error by deleting a post in the 1000, tested on safari/mac
@boomzilla can you provide steps
It wouldn't be hard at all,
multi billion dollars company, and this is how they combat phishing.
http://www.computerworld.com/article/2509783/security0/google-boosts-gmail-s-anti-phishing-feature.htmlnot much changed since 2011
how about those phishing alerts give you an option to jump to the legitimate site?
Mockup:
How difficult is for gmail to detect this email as a phishing attempt.
evil delivery time:
fake From field
link show one url, but actual href is to a different domain
And I really don't need that extra variable, do I?
a.before += '<abbr title="';
a.after= '">' + a.selection + '</abbr>' + a.after;
a.selection=" "; //moved down
window.PagedownCustom.appendButtons
Where do I find info on this stuff? Do I have to troll the source?
Haven't you read the Discodocs.
Tip 1: Use github to search the code, don't look in the DevTools.
A lesson you already learned, debugging the code is not a fun process specially due to some weaknesses in Devtools itself and not limited to the added complexity of the framework.
I was lucky to stumble on the usage of the api in the code, by analysing the source in tracing back potential access points to inject the hack, and it worked much easier then I anticipated.
if I had to invent the wheel, injecting the button would have been a much uglier solution. it would have involved detection of every build of the composer interface which can occur every time the composer is opened. and bind my own handlers, detect the textarea selection and to the replacements.
Let say we were just lucky that the discodev needed that functionality otherwise it would have been a big pain.
To answer your question, yes it is pretty much trolling the source. obviously there is no public api and no docs.
No idea why not, but they get injected but not applied.
There is a minor gotcha with that particular style, when added via jQuery with regard to escaping.
--------------------------------------------------------------------|
V
$(document.body).append('<style> #wmd-del-button::before {content: "\\f12d";}</style>')
Other then that there should be no problem applying style from anywhere( userscript / console). once that style tag is in the document it will get evaluated.
@Monarch said:Thanks@.Onyx@.Zecc forinspirationidea.
You're welcome. And thank you for making this a reality.
//Monarch
$(document).ready(function(){window.PagedownCustom.appendButtons.push({id:"wmd-del-button",description:"del/ins correction",execute:function(a){a.before+="<del>"+a.selection+"</del><ins>";a.selection=" ";a.after="</ins>"+a.after}});$(document.body).append('<style> #wmd-del-button::before {content: "\\f12d";}</style>')});
Thanks @Zecc for the original idea, and @Onyx for the ideainspiration.
http://what.thedailywtf.com/uploads/default/20521/143513050ab042af.mp4
On the downside, Steven Thomas can apparently neither spellar nor gramming,
he is being a little bit cryptic, give him a break
Oh, you can setup alerts, yes, but not limits. Don't ask me why.
There are some obvious and less obvious reasons why there is no "shutdown my service" when X $$$ amount was reached.
But from what I can see, you can run an action based on those Alerts.
so if you know what you are doing you can probably setup some financial protection.
Can we get 'there' from 'here'?
To get from 'here' to 'there' we need to borrow a 't'...
Filed under: Common Core
just like Discourse
all it takes to bring discourse down (10 requests)
/user_actions.json?offset=0&username=accalia&filter=2
It's not on the same level, of course.
How long before you break javascript number E_UINT_OVERFLOW?
given 100 increment every 2 seconds
click once
click again
Result
2.will cause application reload by redirect
Fucking discourse is not limited for human interaction.
It is not meant for automation tools though (running on a free heroku instance)
You fuck discourse manually
E_UINT_OVERFLOW?
When that happened there was only a few hundreds fucks.
So I don't think we reached that number limit of JS, or the DB
I hope by persistent storage you don't mean the local file system, which is deleted on every reboot in Heroku.
I am using Amazon DynamoDB, at the moment. Considering Heroku can put the instance to sleep on no activity. My persistence strategy is to flush to DB every 5 minutes if there is new data.
I think the sleep on no activity is around 30 minutes,Didn't really check, but if the instance prove stable I can probably increase the 5 minutes flush.
I made some minor changes and redeployed. that fixed the counter.
It is possible that the instance restarted for some reason and it failed to pull the counter from DynamoDB.
initializing it with null.
I will probably add some checks for these cases.
gmail sucks whats new?
Here watch the on demand version
profit
It is a stress reliever. so feel free to fuck discourse as much as you want.
maximum profit 100 clicks per sync.
End result: the count has increased by 1 instead of 2.
This is how the counter update is being done:
User Load page
User 1 gets Server.count
User 2 gets Server.count
User 1 increments Client.Increment ---> User see Server.count+Client.Increment
User 2 increments Client.Increment ---> User see Server.count+Client.Increment
User 1 sends counter increment to server ---> Client.Increment
User 2 sends counter increment to server ---> Client.Increment
Server (node,js)
gets User1 increment request ---> request added to event loop for processing
gets User2 increment request ---> request added to event loop for processing
Processing:
---> process next() request in the event loop: | User 1
Server.InternalCounter += Request.Increment
<--- return updated Server.InternalCounter to client
Client update view with new counter.
---------------------------------------------------------------------------
---> process next() request in the event loop: | User 2
Server.InternalCounter += Request.Increment
<--- return updated Server.InternalCounter to client
Client update view with new counter.
---------------------------------------------------------------------------
On a timer
Flush Server.InternalIncrementsCounter to persistent storage every N minutes ( uses incremental update)
Also, the app is saying 0, which I don't believe is true.
I am looking into this, not sure what causing this.
What if two people notify the server that Discourse is fucked during the same 3 seconds?
Heroku worker may go to sleep with inactivity.
I am not sure what kind of affect it has on the node service when it waked up.
could be that is why it is misbehaving.
I looked at the code and there appears to be a race condition if discourse is fucked multiple times during a 3 second period.
When the countdown start, clicking the fuck button while in the countdown, should reset the countdown and postpone the request to the server. and you should be able to click the fuck button as many times as you want.
up to 100 per sync(not enforced client side).
Did you find something that I missed?
Bookmark this link and use in case of emergency.
Belgium Discourse App
Visit the page and show your support. every click literally count!
@accalia maybe you can embed this as a widget whenever http://isitjusmeorservercooties.com/ detect failure.
and allow user to release some steam.
Reading material for the ios developers among them.
On an unrelated note, those are really nice docs, and I've seen that style in a number of places. I would assume those are generated somehow -- anyone know how?
That means properly identifying the root problem and fixing it.
Root problem Identified: Discourse.
Add code as user script to GreaseMonkey or any supporting extension. (only tested on chrome)
While composing a message (The composer must be open or you get an alert)
Select some text you want to quote.
and press
### ALT + Q
support partial quotes and preservation of structure
code quoting works but not 100%, < > and other stuff generate as html entities (>
)
some onebox support
unstable/experimental
discourse still can't render nested quotes properly you can have that fixed by combining it with the Quotes Fixer plugin)
http://what.thedailywtf.com/t/quotes-fixer-client-side-plugin-v2/47582
A partial selection of a quote preserve quote nesting in reply
Play with it, Love it, Hate it.
It is Experimental and I have no plans to improve it or maintain it further.
mine still compiling but I checked the source ;)
I see a pattern here
/[A-z0-9]/
Albert and Bernard just became friends with Cheryl, and they wanted to gain access to her discourse account.
Cheryl give them a list of possible emails and passwords.
email1@wtf.com hunter1 hunter4
email2@wtf2.com hunter2 email3@wtf4.com
email2@wtf3.com hunter3
Cheryl then tells Albert and Bernard separately the password and the email respectively.
each have access to a machine that is signed on to her account.
Who will take over cheryl account?
hint:
[spoiler]
To change your password you need your email.
To change your email you don't need your password.
[/spoiler]
You mean the one Discourse uses that doesn't send e-mails?
Which is more likely,
It does not send emails because mandrill or because discourse.
They do have 99.91% SMTP uptime which is what, less then an hour of temporal downtime a month.
I gave the following configuration a try on EC2
dovecot + postfix + postgresql
I can tell you my conclusion in single word:
#DONTDOIT
as soon as I finished configuring the server(which took a pretty while) and setup the email on my android google blocked my server ip, I guess because I don't have proper reverse dns, and all the other fancy security stuff they expect you to have.
yahoo does not send or receive they are more strict about reverse DNS record
I didn't think they will block me so soon with minimal activity, I didn't even got the chance to do the final touches.
jsfiddle/jsperf link for comparison?
I take it back. I thought I had a test for that. just verified and I didn't.
but still cutting iterations by two allow half the calls to print function
it's not the iterations you're speeding up there.... it's the writing to the console. you halved the number of console writes in the second example.
it is still faster with 2 separate console.log. I moved it to one because I wanted to maintain the 3 lines ;)
for (var i = 0; i < 100; i += 1) {
console.log(100-i);
}
faster solution, cut iterations by 2
Get chrome canary,can be installed side by side with the stable. see if it works better for you.
every time i was typing into the post composer.
So it triggers when you actually type something or is it enough just the composer being open?
I am on windows and I don't have such a thing.
Do you have any extension on? try disabling all and see if still freeze.
if I am not mistaken each tab in chrome is a process, designed to not lock the browser if a single tab crash or acting bad.
Link 404'd
github think I am a bot, god bless the competition, I put it in bitbucket.
###V2.3-beta.js
####Change log
Update to conversation main link
Link will update to reflect the last read message in the conversation (on sync cycle)
** reading a message in the quick preview does not count as reading a message.
A user visiting the conversation page, outside of the widget, could affect the last read message.
A user reply from within the widget will set the last read message to the last message in the conversation (the behavior is based on the data returned by discourse api)
Updates to Conversation time
Separate new posts and unread counter notification bubbles
new posts(blue bubble) reset whenever the user reply to a message, or open the conversation page in the browser(the behavior is based on the data returned by discourse api)
Lowered internal resource cache ttl to have a more accurate notification counter.
UI
thinner scroll bar in quick preview feed
Conversation line separator
minor css changes to better handle longer titles.
I believe that what you describe relate to this.
@Monarch said:
keep in mind that the widget does not update read status, even if you read in the quick preview. the implications are that if you actually decide to watch the conversation outside the widget. the link should take you to the first unread message.
And since the widget only render once per page, it will preserve the last PM you read.
next release I might fix that.
did you had a chance to run the new version, does it work?