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
#!/system/bin/sh | |
# i use https://github.com/steinwurf/adb-join-wifi for auto connect to wifi | |
# tanks | |
# wait for boot to finish completely | |
while [[ `getprop sys.boot_completed` -ne 1 ]] | |
do | |
sleep 1 | |
done |
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
from odoo import models, fields, api | |
from json_field import JsonField | |
class Person(models.Model): | |
_name = 'example.person' | |
_description = 'Person with json details' | |
details = JsonField() # a json object represented as dict / list / python primitives |
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
FROM php:8-cli-alpine | |
# @see: @see: https://stackoverflow.com/a/65969295 | |
RUN apk --no-cache add binutils curl \ | |
&& GLIBC_VER=$(curl -s https://api.github.com/repos/sgerrand/alpine-pkg-glibc/releases/latest | grep tag_name | cut -d : -f 2 | tr -d \",' ') \ | |
&& curl -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ | |
&& curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-${GLIBC_VER}.apk \ | |
&& curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk \ | |
&& apk add --no-cache \ | |
glibc-${GLIBC_VER}.apk \ |
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
adb shell settings put global setup_wizard_has_run 1 | |
adb shell settings put secure user_setup_complete 1 | |
adb shell settings put global device_provisioned 1 | |
adb shell mv /system/system/priv-app/SamsungExperienceService/SamsungExperienceServic | |
e.apk /system/system/priv-app/SamsungExperienceService/SamsungExperienceService | |
.apk.bkp | |
adb shell mv /system/system/priv-app/SetupWizard/SetupWizard.apk /system/system/priv-app/SetupWizard |
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/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
target="${1:-/opt/sublime_merge/sublime_merge}" | |
check_sha() { | |
local sha_valid |
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
printf '\00\00\00' | dd of=sublime_text bs=1 seek=290764 count=3 conv=notrunc | |
https://www.google.com/search?q=%22EA7E-890007%22 |
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
outputDir=/tmp/screenshots/framed | |
mkdir -p ${outputDir} | |
########## | |
# iPhone # | |
########## | |
padPath=/tmp/iphone-pad.png | |
convert -size 1125x185 xc:#e65562 ${padPath} | |
for filePath in $(find /tmp/screenshots/ | grep iPhone | grep -v framed) ; do |
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/bash | |
# Sway WM screen + audio recorder | |
# original author: Aaron D. Fields | |
# blog post: https://blog.spirotot.com/2017/08/21/a-dirty-hack-to-enable-acceptable-sway-wm-screen-recording/ | |
# currently error 503 :-( | |
# | |
# Updated version: ernierasta | |
# Repo: https://gist.github.com/ernierasta | |
# | |
# Changelog: |
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/bash | |
# ===> Set these variables first | |
branch="$GIT_BRANCH" | |
# Example: "Jaskaranbir/MyRepo" | |
repo_slug="$TRAVIS_REPO_SLUG" | |
token="$GITHUB_TOKEN" | |
version="$TRAVIS_TAG" | |
# An automatic changelog generator |
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/bash | |
# check internet connectivity status | |
# file 'status' contains last known status (online or offline) | |
# file 'status.log' has an entry every time status changes | |
source ./status | |
echo "last status: $status at $time" | |
if nc -zw1 google.com 443; then | |
echo "online" | |
if [[ "$status" = "online" ]]; then |
NewerOlder