Skip to content

Instantly share code, notes, and snippets.

View astronomersiva's full-sized avatar

Sivasubramanyam A astronomersiva

View GitHub Profile
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
performAction() {
this.send('doSomething');
}
}
import Ember from 'ember';
import { inject as service } from '@ember/service';
export default Ember.Component.extend({
progressBar: service(),
didInsertElement() {
this._super(...arguments);
}
});
import Ember from 'ember';
export default Ember.Component.extend({
willDestroyElement() {
this.$().remove();
}
});
import Ember from 'ember';
const { on } = Ember;
export default Ember.Component.extend({
actions: {
toggle() {
console.log(this.$())
}
},
destroy: on('willDestroyElement', function () {
console.log(this.$())
import Ember from 'ember';
export default Ember.Controller.extend({
fields: Ember.A(),
actions: {
// doesn't work
addField( ) {
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
isDisabled: false,
actions: {
disableThis: function(){
this.set('isDisabled', true);
console.log('aaaaaa');
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct Values {
char *value;
int counter;
struct Values* next_value;
};
import requests
import json
from random import randint
#Needs the requests module.
#Use (sudo) pip install requests
#http://www.timestampgenerator.com/
#Use this link to generate the timeStamp.
timeStamp = InsertUTCTimeStampHere(eg.1415994915)
from facepy import GraphAPI
import urllib
import os
# Initialize the Graph API with a valid access token
#Generate access token here: https://developers.facebook.com/tools/explorer/
oauth_access_token = 'Access token'
graph = GraphAPI(oauth_access_token)
membersList = []
from facepy import GraphAPI
import webbrowser
# Initialize the Graph API with a valid access token.
#Generate access token here: https://developers.facebook.com/tools/explorer/. Make sure you choose the API version 1.0
oauth_access_token = 'Enter access token here'
graph = GraphAPI(oauth_access_token)
#Will be used to launch a web browser and view the output