Skip to content

Instantly share code, notes, and snippets.

View instagrim-dev's full-sized avatar

Jonathan Maye-Hobbs instagrim-dev

  • .local
View GitHub Profile
@instagrim-dev
instagrim-dev / CMakeLists.txt
Created January 18, 2023 23:32 — forked from kwk/CMakeLists.txt
Fix for "undefined reference to dlopen" in CMake projects
project(testlink)
add_executable(testlink main.cpp)
target_link_libraries(testlink)
@instagrim-dev
instagrim-dev / CMakeLists.txt
Created January 18, 2023 23:32 — forked from kwk/CMakeLists.txt
Fix for "undefined reference to dlopen" in CMake projects
project(testlink)
add_executable(testlink main.cpp)
target_link_libraries(testlink)
@instagrim-dev
instagrim-dev / README.md
Created September 26, 2022 16:07 — forked from darvin/README.md
Travis CI + iOS code signing

Build ios app for iphoneos sdk with signing using Travis ci.

  1. Export your private key that you are going to use for signing from Keychain Access app to ~/privateKey.p12 with export password __YourRandomPass22
  2. Fetch script and run it from your Travis-enabled target iOS app repo: IOS_IDENTITY_KEY=~/privateKey.p12 IOS_IDENTITY_KEY_PASSWORD=__YourRandomPass22 bash <(curl -s https://gist.githubusercontent.com/darvin/96a3af399d0b970a59b1/raw/setup_travis_ios_signing.sh)
  3. Review changes and commit. It suppose to work now.
@instagrim-dev
instagrim-dev / .gitconfig
Created January 10, 2020 19:47 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .
@instagrim-dev
instagrim-dev / xxtea.py
Created December 8, 2019 21:55 — forked from syndrill/xxtea.py
cocos2d-x implementation of XXTEA
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import struct
_DELTA = 0x9E3779B9
def _long2str(v, w):
n = (len(v) - 1) << 2
if w:
@instagrim-dev
instagrim-dev / slack_webhook_post.py
Created August 31, 2018 19:10 — forked from devStepsize/slack_webhook_post.py
POST a JSON payload to a Slack Incoming Webhook using Python requests
'''
This is an example of how to send data to Slack webhooks in Python with the
requests module.
Detailed documentation of Slack Incoming Webhooks:
https://api.slack.com/incoming-webhooks
'''
import json
import requests
@instagrim-dev
instagrim-dev / 1) Install
Created March 8, 2017 21:03 — forked from nghuuphuoc/1) Install
Install Redis on Centos 6
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
@instagrim-dev
instagrim-dev / mysql_secure.sh
Created November 10, 2016 21:39 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@instagrim-dev
instagrim-dev / gist:a19d57ab27c377c22ab1ed755df03ac5
Created August 25, 2016 17:16 — forked from madrobby/gist:9476733
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl -H 'Authorization: token INSERTACCESSTOKENHERE' -H 'Accept: application/vnd.github.v3.raw' -O -L https://api.github.com/repos/owner/repo/contents/path
@instagrim-dev
instagrim-dev / ansible_conditionals_examples.yaml
Created August 22, 2016 23:34 — forked from marcusphi/ansible_conditionals_examples.yaml
Ansible 1.3 Conditional Execution -- Very complete example with comments -- I find the conditional expressions to be ridiculously hard to get right in Ansible. I don't have a good model of what's going on under the surface so I often get it wrong. What makes it even harder is that there has been at least three different variants over the course …
---
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
vars_files: