Skip to content

Instantly share code, notes, and snippets.

View FrenchTechLead's full-sized avatar
🐤
https://twitter.com/FrenchTechLead

MECHERI Akram FrenchTechLead

🐤
https://twitter.com/FrenchTechLead
View GitHub Profile
@FrenchTechLead
FrenchTechLead / examlpe-autocomplete-off.html
Last active May 20, 2020 01:58
Disable autocomplete on inputs
<input type="text"
autocomplete="off"
autocorrect="off"
autocapitalize="none"
spellcheck="false"
/>
@FrenchTechLead
FrenchTechLead / autocomplete-off.directive.ts
Created May 20, 2020 02:07
Angular directive to disable chrome's form autocomplete.
import { Directive, ElementRef } from '@angular/core';
@Directive({
selector: '[autocompleteOff]'
})
export class AutocompleteOffDirective {
constructor(private _el: ElementRef) {
this._el.nativeElement.setAttribute('autocomplete', 'off');
this._el.nativeElement.setAttribute('autocorrect', 'off');
this._el.nativeElement.setAttribute('autocapitalize', 'none');
<input type="text" autocompleteOff />
@FrenchTechLead
FrenchTechLead / hello-world.jvs
Last active October 22, 2020 14:54
Hello Robusta
void main(){
print("Hello World, Robusta is Cooler!");
}
@FrenchTechLead
FrenchTechLead / socket-http-client.py
Last active December 15, 2020 22:07
Simple http client using python sockets.
import socket
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Establishing the TCP connection between the python client and the server
# which is listening on port 80.
client.connect(("o1o.herokuapp.com", 80))
# Constructing the HTTP GET request.
request_line_1 = "GET /posts/post-1.html HTTP/1.1\r\n"
{"claps":50,"comments":1}
import { Directive, ElementRef } from '@angular/core';
@Directive({
selector: '[autocompleteOff]'
})
export class AutocompleteOffDirective {
constructor(private _el: ElementRef) {
let w: any = window;
let isChrome = w.chrome;
if (isChrome) {
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("https://www.wikipedia.org/")
searchInput = driver.find_element_by_name("search")
searchInput.clear()
searchInput.send_keys("selenium software")
@FrenchTechLead
FrenchTechLead / Calculator.java
Last active March 25, 2021 20:26
Calculator V1
package meshredded;
import java.util.ArrayList;
import java.util.List;
class Calculator {
public static void main(String[] args) {
List<String> entries = new ArrayList<>();
@FrenchTechLead
FrenchTechLead / Calculator.java
Last active March 25, 2021 20:54
Calculator V2
package meshredded;
import java.util.ArrayList;
import java.util.List;
import java.util.function.IntBinaryOperator;
class Calculator {
public static void main(String[] args) {
List<String> entries = new ArrayList<>();