Skip to content

Instantly share code, notes, and snippets.

View cesalazar's full-sized avatar
👾
404 - Status not found

Carlos E. Salazar cesalazar

👾
404 - Status not found
View GitHub Profile
@aaronhoffman
aaronhoffman / iphone-text-message-sqlite.sql
Last active February 2, 2024 11:45
SQLite SQL Query for iPhone Text Message Backup
-- more info http://aaron-hoffman.blogspot.com/2017/02/iphone-text-message-sqlite-sql-query.html
select
m.rowid
,coalesce(m.cache_roomnames, h.id) ThreadId
,m.is_from_me IsFromMe
,case when m.is_from_me = 1 then m.account
else h.id end as FromPhoneNumber
,case when m.is_from_me = 0 then m.account
else coalesce(h2.id, h.id) end as ToPhoneNumber
,m.service Service
@can3p
can3p / restart_bluetooth.sh
Created March 17, 2016 08:38 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@subfuzion
subfuzion / curl.md
Last active May 6, 2024 09:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@ahmadawais
ahmadawais / gulpfile.js
Last active June 6, 2018 11:49
Gulp: Browser Sync Task
/**
* Browser Sync
*
* Asynchronous browser syncing of assets across multiple devices!! Watches for changes to js, image and php files
* Although, I think this is redundant, since we have a watch task that does this already.
*/
gulp.task('browser-sync', function() {
var files = [
'**/*.php',
'**/*.{png,jpg,gif}'
@P7h
P7h / tmux__CentOS__build_from_source.sh
Last active May 2, 2024 01:27
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.7
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
@ddo
ddo / README.md
Last active March 24, 2023 19:17 — forked from nicerobot/README.md
uninstall-node.sh

To run this, you can try:

curl -ks https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@matthewpoer
matthewpoer / SugarCRM_Rest_v4_1.md
Created June 4, 2014 20:27
This document is intended to provide a language-neutral guide of using the SugarCRM Rest API v4_1 by displaying the HTTP POSTs used to send and request data. I believe that these POSTs are the best way to understand how these API calls work, since some information is carried in the POST and some as JSON-encoded arrays.

SugarCRM REST API (v4_1)

This document is intended to provide a language-neutral guide of using the SugarCRM Rest API v4_1 by displaying the HTTP POSTs used to send and request data. I believe that these POSTs are the best way to understand how these API calls work, since some information is carried in the POST and some as JSON-encoded arrays.

Please also note that SugarCRM offers a newer version of it's REST API, dubbed

@Kartones
Kartones / postgres-cheatsheet.md
Last active May 7, 2024 17:48
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@timohausmann
timohausmann / facebook_graph_api_2.pde
Created January 20, 2014 19:32
Another Facebook Graph API Example for Processing
/**
* In this example, we will request your first name and your profile picture from Facebook.
* We will store the acquired information in these variables:
*/
String name;
int mutualfriends_amount;
int likes_amount;
/**
* You need an Access Token to perform requests to the Facebook Graph API.
@GianlucaGuarini
GianlucaGuarini / post-merge
Last active August 22, 2023 20:54 — forked from sindresorhus/post-merge
Git hook that gets triggered after any 'git pull' whenever one of the files specified has changed. Useful to update any web application dependency using bower npm or composer
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by Gianluca Guarini
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -E --quiet "$1" && eval "$2"
}