working on it ...

Filters

Explore Public Snippets

Sort by

Found 24k snippets

    public by simonwalker modified Wednesday at 11:31:20 AM  32  0  3  0

    Magento 2 Gift Wrap Extension By FME

    Magento 2 Gift Wrap extension lets you offer gift wrapping on store products. Add an unlimited number of wrap designs and classify them into a variety of gift wrap types. Assign products to each design and add a price to charge for the wrapping service. You can also restrict gift wrap option to selected store views using magento 2 gift wrap. Person
    // Enter here the actual content of the snippet.						

    public by simonwalker modified Oct 4, 2018  75  0  3  0

    Magento 2 Request a Callback - Hide Price Extension By FME

    Magento 2 Request a CallBack extension allows you to hide product prices from selected user groups or store views. You can replace the price option with ‘Get a quote’ popup, an image, or an alternative page. Subsequently, you can hide other Calls-to-action like ‘Add to Cart’, ‘Add to Wishlist’, and ‘Add to compare.’ Set conditions to restrict the p
    // code here 

    public by simonwalker modified Oct 1, 2018  132  1  3  0

    Magento 2 Add Field to Checkout Extension | FME

    With Magento 2 Add Field to Checkout Extension, you can create as many fields as you want to display on the checkout page of your online store. You can choose any field type like text field, text area, date, etc. and configure its data validation as well to prevent users from entering wrong information.Using this Magento 2 Custom Checkout Fields yo
    // Enter here the actual content of the snippet.						
    												

    public by simonwalker modified Sep 3, 2018  127  0  3  0

    Magento 2 Responsive E-Mail Template Extension By FME

    Magento 2 Email Templates extension helps you customize emails for better communication with the buyers and users of your eCommerce website. With 3 different themes, you can choose an appealing layout and design for the transactional emails. Magento email templates sets you free to select between Blue Lagoon, Black and Red Tux, and Orange Peak whic
    // Enter here the actual content of the snippet.						

    public by simonwalker modified Aug 30, 2018  174  0  3  0

    Magento 2 Size Chart Extension By FME

    Magento 2 Size Chart extension allows you to display product size guide so that customers can select and order the right size. You can create, customize, and assign an unlimited number of size charts to your store items using Magento 2 size chart. Upload an image, enter data, or import size charts. Define rules to assign size charts to specific pro
    // Enter here the actual content of the snippet.												

    public by simonwalker modified Aug 29, 2018  112  0  3  0

    Magento 2 Canonical URLs Extension By FME

    Magento 2 Canonical URL extension helps you remove duplicate content issues from your eCommerce website with the addition of canonical Meta tags. You can add Magento canonical tags to products, categories, and CMS pages to define its relevancy with other pages. Magento canonical tags extension can configure the addition of canonical meta tags to a
    // Enter here the actual content of the snippet.						

    public by jewie1000 modified Jul 20, 2018  532  8  4  1

    Best Forty Aimbot/ESP Users | CB:RO Hackers

    DanielTCZ#0768
    ! Yu_riTCZ#2291
    fire#1443
    krump#8883
    x0hs#9452
    Frost#7467
    DaveTCZ#1966
    Arkey#9403
    Duke101#1210
    FallenGrim#8461
    GhOoOsT_T#4768
    ugunszelis#7328
    Milooue#6934
    tristris#3368
    floppib#2082
    mightybaseplate#0001
    Kroucher#7634
    remm#1160
    ItsFergLad#0761
    Wood#4408
    Paragon#7930
    Foamy#2227
    XexerTV(RipX)#4660
    ProToType#9739
    MaxNero#9511
    𝓀𝑒𝓋𝒾𝓂𝑒𝒽𝒶𝓂#7092
    Flaming#4421
    Lun4rSpy#3839
    Khayso#3875
    gnome#0962
    oRq_z#6991
    Corn#0505
    Cold#1621
    EU | ✪ EzGamingTv12#8168
    StatTrakDoggo#7793
    Ziovixx#5012
    レイチェル・ガードナ#0890
    DeclaredTruth#3896
    J0sh#4948
    www#8902												

    public by Unsnipped modified Jan 24, 2018  786  0  3  0

    stuff

    C++
    // Enter here the actual content of the snippet.						

    public by tomsim modified Jan 21, 2018  1277  2  6  0

    ESP8266 wifi web server setup

    Lambda style Wifi web server with DHT22 data upload to ThingSpeak
    /* DHTServer - ESP8266 Webserver with a DHT sensor as an input
    
       Based on ESP8266Webserver, DHTexample, and BlinkWithoutDelay (thank you)
    
       Version 1.0  5/3/2014  Version 1.0 Mike Barela for Adafruit Industries
    */
    #include <ESP8266WiFi.h>
    #include <WiFiClient.h>
    #include <ESP8266WebServer.h>
    #include <DHT.h>
    #include <TimeLib.h>
    #include "ThingSpeak.h"
    
    #define DHTTYPE DHT22
    
    const int DHTPIN = D4;
    
    const char* ssid     = "mySSID";
    const char* password = "myPassword";
    
    ESP8266WebServer server(80);
    
    /*============ ThingSpeak setup ==================*/
    // Note:  Each channel has its own number and write API key
    // API key is what get used - wrong channel number doesn't matter
    
    // Temperature Humidity Channel
    static unsigned long myChannelNumber = 123456;
    static const char 	*myWriteAPIKey = "AB1CDEF6HIJKLMNO";
    static WiFiClient  client;
    
    /*============ End ThingSpeak setup ==============*/
    
    
    // Initialize DHT sensor 
    // NOTE: For working with a faster than ATmega328p 16 MHz Arduino chip, like an ESP8266,
    // you need to increase the threshold for cycle counts considered a 1 or 0.
    // You can do this by passing a 3rd parameter for this threshold.  It's a bit
    // of fiddling to find the right value, but in general the faster the CPU the
    // higher the value.  The default for a 16mhz AVR is a value of 6.  For an
    // Arduino Due that runs at 84mhz a value of 30 works.
    // This is for the ESP8266 processor on ESP-01 
    DHT dht(DHTPIN, DHTTYPE, 11); // 11 works fine for ESP8266
     
    float lastHumdty, lastTempF;  // Values read from sensor
    static int nextSampleMinute = 15;
    static int minuteSampleInterval = 15;
    
    // Generally, you should use "unsigned long" for variables that hold time
    unsigned long previousMillis = 0;        // will store last temp was read
    const long interval = 2000;              // interval at which to read sensor
    
    void getTemperature() {
      // Wait at least 2 seconds seconds between measurements.
      // if the difference between the current time and last time you read
      // the sensor is bigger than the interval you set, read the sensor
      // Works better than delay for things happening elsewhere also
      unsigned long currentMillis = millis();
     
      if(currentMillis - previousMillis >= interval) {
        // save the last time you read the sensor 
        previousMillis = currentMillis;   
    
        // Reading temperature for humidity takes about 250 milliseconds!
        // Sensor readings may also be up to 2 seconds 'old' (it's a very slow sensor)
        lastHumdty = dht.readHumidity();          // Read humidity (percent)
        lastTempF = dht.readTemperature(true);     // Read temperature as Fahrenheit
        // Check if any reads failed and exit early (to try again).
        if (isnan(lastHumdty) || isnan(lastTempF)) {
          Serial.println("Failed to read from DHT sensor!");
          return;
        }
      }
    }
    
    static int uploadData(void)
    {
    	ThingSpeak.setField( 1, lastTempF);
    	ThingSpeak.setField( 2, lastHumdty);
    	int rc = ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
    //	Serial.println(String("Post rc=")+rc);
    	return rc;
    }
    
     
    const String HTML_TYPE = "text/html";
    
    void handle_null() {
        Serial.println("Handle null");
    	server.send(200,HTML_TYPE,"");
    	delay(100);
    }
    void handleRoot()
    {
    	String wstr = 
    	"<p>Hello from the weather esp8266, read from /temp or /humidity"
    	"<br>set <a href=/set?minuteSampleInterval=5>5 minute</a> sample interval"
    	", <a href=/set?nextSampleMinute=15>sample at 15 </a> minute"
    	"<br>Take <a href=/sample>sample Data</a> and upload to ThingSpeak"
    	"<br><a href=/temp>Get Temperature</a>"
    	"<br><a href=/humidity>Get Humidity</a>";
    	wstr += "<br>Last temperature: " + String(lastTempF)+"F";
    	wstr += " humidity: " + String(lastHumdty)+"%";
    	wstr += "<br>Current minute: " + String(minute(now()));
    	wstr += " next sample time: " + String(nextSampleMinute)+" min.";
    	wstr += " sample interval: " + String(minuteSampleInterval)+" min.";
    	server.send(200,HTML_TYPE, wstr);
    	delay(100);
    }
    void doSample()
    {
    	Serial.println("DoSample");
    	getTemperature();
    	int rc = uploadData();
    	String wstr = "<p>Take sample data:  ";
    	wstr += "<br>Temperature " + String(lastTempF);
    	wstr += "<br>Humidity " + String(lastHumdty);
    	wstr += "<br>Upload thingspeak rc=" + String(rc);
    	server.send(200,HTML_TYPE, wstr);
    }
     
    // Web Server Service Definition structure
    // =======================================
    typedef struct s_WebServiceDef
    {
    	const char *urlName;
    	void (*doit)(void);
    } WebServiceDef;
    
    /* =======================================================================
    	Define web service definition here
    	Each entry has a URL name and a lambda function to service the request
       =======================================================================
    */
    static WebServiceDef wsd[] = {
    	{ "/", handleRoot },
    	{ "/favicon", handle_null },
    	{ "/temp",			// url name
    		[] ()				// lambda function
    		{
    			getTemperature();       // read sensor
    			String wstr="Temperature: "+String((int)lastTempF)+" F";
    			server.send(200, "text/plain", wstr);   // send to someones browser when asked
    		}
    	},
    	{ "/humidity", []()
    		{ 
    			getTemperature();
    			String wstr="Humidity: "+String((int)lastHumdty)+"%";
    			server.send(200, "text/plain", wstr);
    		}
    	},
    	{ "/sample", doSample },
    	{ "/set", []()
    		{
    			String n = String("minuteSampleInterval");
    			if (server.hasArg(n))
    			{
    				int v = server.arg(n).toInt();
    				if (v)
    					minuteSampleInterval = v;
    			}
    			n = String("nextSampleMinute");
    			if (server.hasArg(n))
    			{
    				int v = server.arg(n).toInt();
    				if (v)
    					nextSampleMinute = v;
    			}
    			server.send(200, "text/plain", "ok");
    		}
    	},
     	{0,0}
    };
    
    static void setupServerHandler(void)
    {
    	for (int i; wsd[i].urlName; i++)
    	{
    		server.on( wsd[i].urlName, wsd[i].doit);
    	}
    	server.onNotFound(handleRoot);
    }
    
    static int nextAlarmMin(int sampleInterval)
    {
    	int nextMin = minute(now());
    	nextMin = ((nextMin + sampleInterval) % 60);	// alarm every 5 min
    	return nextMin;
    }
    
    
    
    void setup(void)
    {
    	// You can open the Arduino IDE Serial Monitor window to see what the code is doing
    	Serial.begin(115200);  // Serial connection from ESP-01 via 3.3v console cable
    	dht.begin();           // initialize temperature sensor
    
    	// Connect to WiFi network
    	WiFi.begin(ssid, password);
    	Serial.print("\n\r \n\rWorking to connect");
    
    	// Wait for connection
    	while (WiFi.status() != WL_CONNECTED) {
    	delay(500);
    	Serial.print(".");
    	}
    	Serial.println("");
    	Serial.println("DHT Weather Reading Server");
    	Serial.print("Connected to ");
    	Serial.println(ssid);
    	Serial.print("IP address: ");
    	Serial.println(WiFi.localIP());
    
    	ThingSpeak.begin(client);
    
    	setupServerHandler();
    
    	server.begin();
    	Serial.println("HTTP server started");
    }
     
    void loop(void)
    {
    	int currentMinute = minute(now());
    
    	if (currentMinute == nextSampleMinute)
    	{
    		// trigger sample at set interval
    		Serial.println("Regular sample");
    		getTemperature();
    		int rc = uploadData();
    		Serial.println("rc=" + String(rc));
    
    		nextSampleMinute = nextAlarmMin(minuteSampleInterval);
    		delay(1000);
    	}
    
    	server.handleClient();
    } 
    
    

    public by rthurber modified Nov 30, 2017  440  6  3  1

    webex.pl

    C++
    // Enter here the actual content of the snippet.						$a = 1;
    • Public Snippets
    • Channels Snippets