Skip to content

Instantly share code, notes, and snippets.

View gaiar's full-sized avatar

Gaiar Baimuratov gaiar

View GitHub Profile
@schappim
schappim / config.sh
Created December 29, 2011 06:21
Ninja Config
touch /etc/opkg/ninja.conf;
echo 'src/gz angstrom-base http://us.feeds.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base' > /etc/opkg/ninja.conf;
opkg update;
opkg install ca-certificates;
opkg install libncurses5;
opkg install ncurses-dev;
opkg install tk-dev;
opkg install tcl-dev;
opkg install libssl1.0.0;
opkg install libcrypto1.0.0;
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 31, 2025 19:19
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jkbrzt
jkbrzt / pyc
Last active June 6, 2023 14:59
Delete Python's compiled *.pyc files like a pro
#!/bin/sh
#
# Delete Python's compiled *.pyc and __pycache__ files like a pro
# https://gist.github.com/jakubroztocil/7892597
#
# Usage:
# Delele *.pyc and __pycache__ files recursively in the current directory:
# $ pyc
#
# The same, but under /path:
@mattcassinelli
mattcassinelli / App Store
Created February 2, 2014 07:49
Action list to open the App Store, search for a term, and open the Top Paid, Free, or Grossing charts.
http://[[list:App Store|Open=appstore.com/|Search=search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=[prompt:Query]|Top Paid=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=30|Top Free=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=27|Top Grossing=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=38]]
http://
[[
list:App Store
|Open=appstore.com/
|Search=search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=[prompt:Query]
|Top Paid=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=30
|Top Free=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=27
|Top Grossing=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=38
@derhuerst
derhuerst / _.md
Last active May 20, 2025 15:03
List of HAFAS API Endpoints
@beforeyouknowit
beforeyouknowit / plex_on_appletv.md
Last active March 27, 2017 21:53
Plex on AppleTV via Intel Edison

Bridging Plex onto AppleTV with PlexConnect and Intel Edison

Intel Edison Mini Breakout Board

For this tutorial you will need:

  • An Intel Edison and Mini Breakout Board or Arduino Breakout Board. Note: Your Edison needs to be running factory Yocto and/or updated Yocto via Intel's Phone Flash Tool, but NOT ubilinux. YMMV with other linux distros.
  • At least 2x USB to Micro-USB data cables. (Careful, some are only good for charging.)
  • An AppleTV, i.e. Model A1469 or similar revision 3 hardware, running the most up-to-date AppleTV OS package, i.e. 7.2 or greater. No AppleTV jailbreaks or root exploits are required for this workaround.
  • A reasonably fast (sustained 10Mbps or greater) local wireless network with a known SS
@leandrotoledo
leandrotoledo / main.py
Last active February 2, 2024 00:08
Webhook using self-signed certificate and Flask (with python-telegram-bot library)
#!/usr/bin/env python
'''Using Webhook and self-signed certificate'''
# This file is an annotated example of a webhook based bot for
# telegram. It does not do anything useful, other than provide a quick
# template for whipping up a testbot. Basically, fill in the CONFIG
# section and run it.
# Dependencies (use pip to install them):
# - python-telegram-bot: https://github.com/leandrotoledo/python-telegram-bot
@pilbot
pilbot / ChunkyCache.gs
Created January 6, 2016 11:47
Using the Google Apps Script Cache Service for objects above 100Kb
function ChunkyCache(cache, chunkSize){
return {
put: function (key, value, timeout) {
var json = JSON.stringify(value);
var cSize = Math.floor(chunkSize / 2);
var chunks = [];
var index = 0;
while (index < json.length){
cKey = key + "_" + index;
chunks.push(cKey);
@devStepsize
devStepsize / slack_slash_cmd.py
Created April 21, 2016 23:12
Server-side logic to handle a Slack slash command using Python and Flask
'''
This is an example of the server-side logic to handle slash commands in
Python with Flask.
Detailed documentation of Slack slash commands:
https://api.slack.com/slash-commands
Slash commands style guide:
https://medium.com/slack-developer-blog/slash-commands-style-guide-4e91272aa43a#.6zmti394c
'''
$ git clone -b 1.22 https://github.com/crosstool-ng/crosstool-ng.git
$ cd crosstool-ng
$ ./bootstrap
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ..
$ mkdir ctng
$ cd rpi1
$ ct-ng menuconfig