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 os | |
from PIL import Image | |
from PIL.ExifTags import TAGS | |
# Function to check if the image was taken by a Fujifilm camera | |
def is_fujifilm(image_path): | |
try: | |
image = Image.open(image_path) | |
exif_data = image._getexif() | |
if exif_data: |
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, {useEffect} from 'react'; | |
import {Alert, Button, View} from 'react-native'; | |
import {finishTransaction, Purchase, PurchaseError, useIAP, useIAPContext} from 'react-native-iap'; | |
const PaymentComponent: React.FC = () => { | |
const {connected, subscriptions, currentPurchase, currentPurchaseError, requesSubscription, getSubscriptions} = | |
useIAP(); | |
const {setCurrentPurchaseError} = useIAPContext(); | |
// (1) get subscription plans |
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
# ~/.config/fish/config.fish | |
function ffmpeg-gif | |
ffmpeg -i $argv -filter_complex "[0:v] fps=10,scale=1080:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" $argv.gif | |
end |
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
#!/bin/zsh | |
function command_exists { | |
command -v "$1" > /dev/null; | |
} | |
# Set up Xcode | |
if command_exists xcode-select; then | |
xcode-select --install | |
sudo xcodebuild -license accept |
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
# generates seeds.rb from tabelog area definitions | |
# | |
# Usage: | |
# $ ruby tabelog.rb >> db/seeds.rb | |
# | |
# Premises: | |
# $ rails g model Prefecture name | |
# $ rails g model Area prefecture:references name | |
require 'nokogiri' |
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
require 'json' | |
require 'open-uri' | |
require 'slack-notifier' | |
url = ENV["ETHERMINE_API_URL"] | |
json = JSON.load(open url) | |
message = "Unpaid Balance: #{json['unpaid'] / 10.0 ** 18} ETH \n" | |
json['workers'].each do |worker, status| | |
message << "#{worker}: #{status['hashrate']} \n" |
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
require 'json' | |
require 'open-uri' | |
require 'slack-notifier' | |
url = ENV["ETHERMINE_API_URL"] | |
json = JSON.load(open url) | |
message = "Unpaid Balance: #{json['unpaid'] / 10.0 ** 18} ETH \n" | |
json['workers'].each do |worker, status| | |
message << "#{worker}: #{status['hashrate']} \n" |
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
00 05 01 * * /home/alea12/letsencrypt/letsencrypt-auto certonly --webroot -w /var/www/html -d example.net --renew-by-default && nginx -t && nginx -s reload |
NewerOlder