Skip to content

Instantly share code, notes, and snippets.

View sawa2d2's full-sized avatar
👾

sawa sawa2d2

👾
View GitHub Profile
@sawa2d2
sawa2d2 / index.js
Created September 1, 2024 11:09
GraphQL with axios
import React, { useState, useEffect } from 'react';
import axios from 'axios';
const HelloComponent = () => {
const [helloMessage, setHelloMessage] = useState('Loading...');
useEffect(() => {
const fetchData = async () => {
try {
const graphqlQuery = {
Name: example-package
Version: 1.0
Release: 1%{?dist}
Summary: An example RPM package
License: GPL
URL: http://www.example.com
Source0: example.txt
BuildArch: noarch
@sawa2d2
sawa2d2 / how-to-upload-download-pdf-to-kindle-cloud.md
Last active December 8, 2022 19:24
How to upload/download pdf to Kindle Cloud
@sawa2d2
sawa2d2 / GAS(clasp)
Last active May 12, 2020 03:36
Dockerfiles
FROM node:14
RUN apt-get update \
&& npm install -g @google/clasp -g \
WORKDIR /workdir
VOLUME /workdir
SHELL ["/bin/bash", "-c"]
# Ref: https://webird-programming.tech/archives/262
function scraping() {
var fetch = UrlFetchApp.fetch("https://example.com/");
var response = fetch.getContentText();
Logger.log(response);
}
@sawa2d2
sawa2d2 / Open Android Emulator
Last active March 30, 2020 18:46
Mobile app / Flutter
$ANDROID_HOME/emulator/emulator -avd Pixel_3a_XL_Edited_API_25
iconv -c -f sjis -t utf8 original.txt -o output.txt
tar -cvf xxx.tar.yy directory
docker rm -f $(docker ps -qa)