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
(defun insert-and-indent-line-above () | |
(interactive) | |
(push-mark) | |
(let* | |
((ipt (progn (back-to-indentation) (point))) | |
(bol (progn (move-beginning-of-line 1) (point))) | |
(indent (buffer-substring bol ipt))) | |
(newline) | |
(previous-line) | |
(insert indent))) |
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
const Web3 = require('web3'); | |
const fs = require('fs'); | |
const gasPriceTokenApproval = '5.5'; // Set your desired gas price in Gwei for token approval | |
const gasPricePancakeSwap = '10'; | |
// Connect to the BSC network using a provider URL | |
const providerUrl = 'https://bsc-dataseed.binance.org'; | |
const web3 = new Web3(providerUrl); |
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
import styled from 'styled-components'; | |
import { useMemo, useRef, useState, useEffect, createContext, useContext } from 'react'; | |
const Butn=styled.button` | |
background: ${props => props.primary ? "navy" : "#4CAF50"}; | |
border: none; | |
color: white; | |
padding: 15px 32px; | |
text-align: center; | |
text-decoration: none; |
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
import styled from 'styled-components'; | |
import { useMemo, useState, useEffect, createContext, useContext } from 'react'; | |
const Fleg=styled.div` | |
display: flex; | |
` | |
const Col=styled.div` | |
display: flex; | |
justify-content: center; |
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
const anchor = require('@project-serum/anchor'); | |
describe('tiktaktoe', () => { | |
anchor.setProvider(anchor.Provider.env()); | |
const program = anchor.workspace.Tictactoe; | |
let dashboard = anchor.web3.Keypair.generate() | |
let game = anchor.web3.Keypair.generate() | |
let player_o = anchor.web3.Keypair.generate() |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"io" | |
"os" | |
"log" | |
"github.com/vartanbeno/go-reddit/reddit" | |
) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width-device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Card Game</title> | |
<style> | |
.some-page-wrapper { | |
margin: 15px; |
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
import React, { useState } from 'react' | |
import axios from 'axios'; | |
const App = () => { | |
const [values, setValues] = useState({name: '', message: '', email: ''}) | |
const [sent, setSent] = useState(false); | |
const handleChange = e => { | |
const {name, value} = e.target | |
setValues({...values, [name]: value}) | |
} |
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
const request = require('request'); | |
let token="xoxo-xoxo"; | |
let channelid="C00LR00M"; | |
var url = "https://slack.com/api/chat.postMessage"; | |
var auth_token = token; //Your Bot's auth token | |
var headers = { | |
"Authorization": "Bearer " + auth_token, | |
"Content-Type" : "application/json" | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>JavaScript GET Request</title> | |
<style> | |
.box { |
NewerOlder