Skip to content

Instantly share code, notes, and snippets.

View ihewro's full-sized avatar

我愿人长久 ihewro

View GitHub Profile
@opensvn
opensvn / nutstore_git.sh
Last active September 2, 2017 07:17
If a file in local git repository has no write permission, nutstore will stuck in analyzing that file. This script add write permission to the files modified in a day, so nutstore can upload those files.
#!/usr/bin/env bash
today=`date +%Y-%m-%d`
check_modify_time() {
file=$1
modify_date=`stat $file | grep -i Modify | awk -F. '{print $1}' | awk '{print $2}'`
if [ ${today} = ${modify_date} ]; then
return 0
fi
@southill
southill / imgLoadBeforeOnload.js
Created October 25, 2013 04:02
在图片onload之前获取图片的头部数据中的宽高
// 更新:
// 05.27: 1、保证回调执行顺序:error > ready > load;2、回调函数this指向img本身
// 04-02: 1、增加图片完全加载后的回调 2、提高性能
/**
* 图片头数据加载就绪事件 - 更快获取图片尺寸
* @version 2011.05.27
* @author TangBin
* @see http://www.planeart.cn/?p=1121
* @param {String} 图片路径
@jat001
jat001 / namebase.py
Created February 20, 2020 10:05
Sell HNS automatically
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from decimal import Decimal
from datetime import datetime
try:
import requests
import simplejson as json
@phrozenra
phrozenra / login-navigator.js
Created February 17, 2017 17:04
react-navigation: full screen background with transparent status bar and nav bar
import React from 'react'
import { StackNavigator } from 'react-navigation'
import { Image, StatusBar, Platform } from 'react-native'
import SignInScreen from './signin'
import LoginScreen from './login'
import RegisterScreen from './register'
import ForgotPasswordScreen from './forgot-password'
import Styles from '../../styles/login'
@figgis
figgis / vqm.py
Last active October 31, 2023 13:03
vqm 2 xlsx
#!/usr/bin/env python
#
# vqm Run and parse the output of mitsuLinuxMultithread.
# Generate a xlsx-file with all the data as well as a summary sheet.
# Tested on Linux only.
#
# USAGE: vqm path
#
# NOTE: YCbcr files needs to be adhere to the following naming convention:
# NAME_WIDTHxHEIGHT_FPS_...yuv
@MrTrustor
MrTrustor / clean-docker-for-mac.sh
Last active November 21, 2023 11:38
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@nwade
nwade / README.md
Last active April 9, 2024 15:38
Remove SentinelOne Agent - macOS High Sierra/Mojave

Warning - use at your own risk

Remove SentinelOne agent from Mac

  1. Boot into Recovery Mode by holding Cmd+R during reboot
  2. Open Terminal from top menubar
  3. Run /Applications/Utilities/Disk\ Utility.app/Contents/MacOS/Disk\ Utility to open Disk Utility
  4. If your startup disk is encrypted, use Disk Utility to mount it
  5. In Terminal, run chroot /Volumes/Macintosh\ HD
  6. Execute the deletion commands or script