This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autorun": false, | |
"terminals": [ | |
{ | |
"name": "Build and Run current file", | |
"description": "Build and Run current C file using GCC", | |
"focus": true, | |
"cwd": "[fileDirname]", | |
"commands": [ | |
"gcc [fileBasename] -o [fileBasenameNoExtension]", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.contextMenus.create({ | |
id: "context1", | |
title: "First", | |
contexts: ["all"] | |
}); | |
chrome.contextMenus.create({ | |
id: "context2", | |
title: "Second", | |
contexts: ["all"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
net session >nul 2>&1 | |
if %errorLevel% == 0 ( | |
echo Default uplay directory is "%ProgramFiles% (x86)\Ubisoft\Ubisoft Game Launcher\upc.exe". | |
) else ( | |
echo Administrator Priviliages required to run this task. | |
pause | |
exit | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mListView = (ListView) findViewById(R.id.ListView); | |
DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReferenceFromUrl("https://project-name.firebaseio.com/"); | |
FirebaseListAdapter<String> firebaseListAdapter = new FirebaseListAdapter<String>(this,String.class,android.R.layout.simple_list_item_1,databaseReference) { | |
@Override | |
protected void populateView(View v, String model, int position) { | |
TextView textView = (TextView) v.findViewById(android.R.id.text1); | |
textView.setText(model); | |
} | |
}; | |
mListView.setAdapter(firebaseListAdapter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST --header "Authorization: key=[FIREBASE_SERVER_KEY]" --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d "{\"to\":\"[DEVICE_TOKEN]\",\"notification\":{\"body\":\"[MESSAGE]\"},\"priority\":10}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cp = curl_init(); | |
curl_setopt($cp, CURLOPT_URL,"https://fcm.googleapis.com/fcm/send"); | |
curl_setopt($cp, CURLOPT_POST, 1); | |
curl_setopt($cp, CURLOPT_HTTPHEADER, array( | |
'Authorization: key=[FIREBASE_SERVER_KEY]', | |
'Content-Type: application/json' | |
)); | |
curl_setopt( $cp,CURLOPT_SSL_VERIFYPEER,false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
net session >nul 2>&1 | |
if %errorLevel% == 0 ( | |
echo Default uplay directory is "%ProgramFiles% (x86)\Ubisoft\Ubisoft Game Launcher\upc.exe". | |
) else ( | |
echo Administrator Priviliages required to run this task. | |
pause | |
exit | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <DHT.h> | |
#include <TM1637Display.h> | |
#define DHTPIN 9 // what pin we're connected to | |
#define DHTTYPE DHT22 // DHT 22 (AM2302) | |
DHT dht(DHTPIN, DHTTYPE); | |
int button = 13; | |
int status = false; | |
int chk; | |
int stt = false; | |
float hum; //Stores humidity value |
NewerOlder