Skip to content

Instantly share code, notes, and snippets.

@nightsailer
nightsailer / agent loop
Created March 10, 2025 04:08 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@nightsailer
nightsailer / install_nodejs
Created April 25, 2022 02:06
Install nodejs rpm on amazon linux
curl -fsSL https://rpm.nodesource.com/setup_17.x | sudo bash -
sudo yum install -y nodejs gcc-c++ make
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn
@nightsailer
nightsailer / openmp_arm.patch
Last active March 17, 2021 07:48
llvm@9_openmp_arm.patch
diff -pur llvm-project-llvmorg-9.0.1-old/openmp/runtime/src/z_Linux_asm.S llvm-project-llvmorg-9.0.1/openmp/runtime/src/z_Linux_asm.S
--- llvm-project-llvmorg-9.0.1-old/openmp/runtime/src/z_Linux_asm.S 2021-03-17 15:34:09.000000000 +0800
+++ llvm-project-llvmorg-9.0.1/openmp/runtime/src/z_Linux_asm.S 2021-03-17 15:34:47.000000000 +0800
@@ -1540,10 +1540,12 @@ __kmp_unnamed_critical_addr:
.comm .gomp_critical_user_,32,8
.data
.align 8
- .global __kmp_unnamed_critical_addr
-__kmp_unnamed_critical_addr:
+ .global KMP_PREFIX_UNDERSCORE(__kmp_unnamed_critical_addr)
@nightsailer
nightsailer / build grpcio on M1 Apple Silicon
Last active May 23, 2021 07:47
build python pkgs on M1 Apple Silicon
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
export CFLAGS="-I/opt/homebrew/opt/openssl/include"
export LDFLAGS="-L/opt/homebrew/opt/openssl/lib"
python setup.py bdist
python setup.py install
@nightsailer
nightsailer / hubflow_workflow
Created February 22, 2019 00:48 — forked from truemagic-coder/hubflow_workflow
Hubflow Workflow
Git Hubflow Workflow:
Sync Branch:
git hf update - this will update master and develop and sync remote branches with local ones (be sure not to put commits into develop or master as it will push these up)
git hf push - this will push your commits in your local branch to the matching remote branch
git hf pull - this will pull the remote commits into your local branch (don't use if the remote branch has been rebased - use git pull origin "your-branch" instead)
Feature Branch:
gif hf feature start "my-feature" - this will create a feature branch on origin and local will be based off the latest develop branch (make sure to git hf update before or you will get an error if local develop and remote develop have divereged)
git hf feature finish "my-feature" - this will delete the local and remote branches (only do this after a PR has been merged)
@nightsailer
nightsailer / pypy_compat.py
Created November 26, 2017 03:34
hack to use just the micronumpy part
import sys
IS_PYPY = hasattr(sys, 'pypy_version_info')
if IS_PYPY:
if '--no-numpypy' in sys.argv:
print 'numpypy switched off by command line option'
USE_NUMPYPY = False
else:
USE_NUMPYPY = True
else:
# CPython
@nightsailer
nightsailer / install-setup.txt
Created November 12, 2017 07:01 — forked from dropwhile/install-setup.txt
python serialization speed comparison
virtualenv --no-site-packages hodor
hodor/bin/pip install simplejson ujson cbor tnetstring msgpack-python
curl -s 'http://www.json-generator.com/api/json/get/cvfsLVmKiG?indent=2' > test.json
hodor/bin/python shootout.py
@nightsailer
nightsailer / bench_excel_writers.py
Created November 25, 2016 07:09 — forked from jmcnamara/bench_excel_writers.py
Benchmark of several Python Excel writing modules
##############################################################################
#
# Simple Python program to benchmark several Python Excel writing modules.
#
# python bench_excel_writers.py [num_rows] [num_cols]
#
#
import sys
from time import clock
#!/bin/bash
# disable RemoteDesktop
# OS X 10.8.2
# https://gist.github.com/3870057
home=$HOME
bk=$home/backup-remotedesktop-extentions
mkdir $bk

Git HubFlow Cheat Sheet

Preparing the repository

Create the repository on GitHub/Bitbucket. Once created, clone the created repository to your local machine using:

git clone [email protected]:username/repository.git

CD into the repository folder and run the init command to enable to hub flow tools:

cd repo_name