Skip to content

Instantly share code, notes, and snippets.

View ar5had's full-sized avatar
🎯
Focusing

Arshad Khan ar5had

🎯
Focusing
View GitHub Profile
arshad@asd:~/Documents/gr/comm-central$ ./mozilla/mach build
0:01.21 /usr/bin/make -f client.mk -s
0:01.55 Adding client.mk options from /home/arshad/Documents/gr/comm-central/mozconfig:
0:01.55 FOUND_MOZCONFIG := /home/arshad/Documents/gr/comm-central/mozconfig
0:10.53 make[2]: Circular /home/arshad/Documents/gr/comm-central/mozilla/CLOBBER <- /home/arshad/Documents/gr/comm-central/mozilla/CLOBBER dependency dropped.
0:10.59 make[3]: Circular /home/arshad/Documents/gr/comm-central/mozilla/CLOBBER <- /home/arshad/Documents/gr/comm-central/mozilla/CLOBBER dependency dropped.
0:10.76 Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:10.78 Elapsed: 0.02s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:10.97 Elapsed: 0.10s; From dist/xpi-stage: Kept 15 existing; Added/updated 0; Removed 2 files and 0 directories.
0:21.03 Elapsed: 10.28s; From dist/idl: Kept 1333 existing; Added/updated 0; Removed 0 files
// state = { len: 2, arr: [1,2] };
const newState = Object.assign({}, state);
// for simplicity sake
newState.arr = [3, 4];
this.setState({state: newState});
// or
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@ar5had
ar5had / JSFirst.md
Created May 11, 2017 15:51 — forked from rtoal/JSFirst.md
JSFirst

JS First

About This Manifesto

Have you ever argued for or against teaching language X as the first language in a university computer science curriculum? If so, I hope that your arguments:

  • were first and foremost about students, not about your personal language preferences (in other words, you should answer the question “What do we want students to gain from their experience with a first language?”, not “Is language X better than language Y?” because people hate that latter question);
  • kept in mind that ultimately we want to train polyglots, so the first language is never the only language; and
  • took into account previous work from computing educators, and education theorists and practitioners in general.
@ar5had
ar5had / blockscope-vars-in-es5.js
Created May 12, 2017 15:40
hack for block scope variables in es5..
try {
throw 1;
} catch (myfancyvariable) {
console.log('This variable is only availabe within this catch block =>', myfancyvariable);
}
/ WARNING
//
// Do NOT edit this file while ZNC is running!
// Use webadmin or *controlpanel instead.
//
// Altering this file by hand will forfeit all support.
//
// But if you feel risky, you might want to read help on /znc saveconfig and /znc rehash.
// Also check http://en.znc.in/wiki/Configuration
@ar5had
ar5had / gist:5bb796b1f07fc9046ddaa10e78c152be
Created May 25, 2017 09:16 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
// Suppose we want a div to have some custom attributes, normally react wouldn't allow custom attributes
// so this is a hack to att as much custom attributes to your component as you want
class Div extends React.Component {
componentDidMount() {
this.addAttributes();
}
componentWillReceiveProps(nextProps) {
const { Provider } = ReactRedux;
window.addEventListener("message", e => {
// extentions and other 3rd party scripts talk via postMeessage api(same orgin)
// so it is very important to filter those events
if (e.origin !== window.location.origin || !e.data || e.data.source !== "dialog-message") {
return;
}
// parent and window are same thing if the current page is not in any frame