Skip to content

Instantly share code, notes, and snippets.

@faisalman
faisalman / Rupiah.as
Created February 26, 2011 15:35
Konversi Angka ke format Rupiah & vice versa (C#, PHP, JavaScript, ActionScript 3.0)
package
{
/**
* ActionScript 3.0 Code Snippet
* Convert Number to Rupiah & vice versa
* https://gist.github.com/845309
*
* Copyright 2011-2012, Faisalman
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
@santaklouse
santaklouse / CrossOver.sh
Last active March 4, 2025 02:39
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@marcostolosa
marcostolosa / socat.md
Last active March 4, 2025 02:36
SOCAT Useful commands

To link serial port ttyS0 to another serial port: socat /dev/ttyS0,raw,echo=0,crnl /dev/ttyS1,raw,echo=0,crnl

To get time from time server: socat TCP:time.nist.gov:13 -

To forward local http port to remote http port: socat TCP-LISTEN:80,fork TCP:www.domain.org:80

@jlpouffier
jlpouffier / voice_preview_edition_experimental_streaming_wake_word_firmware.yaml
Created December 16, 2024 20:45
Voice Preview Edition Experimental Streaming Wake Word Firmware
substitutions:
# Phases of the Voice Assistant
# The voice assistant is ready to be triggered by a wake word
voice_assist_idle_phase_id: '1'
# The voice assistant is waiting for a voice command (after being triggered by the wake word)
voice_assist_waiting_for_command_phase_id: '2'
# The voice assistant is listening for a voice command
voice_assist_listening_for_command_phase_id: '3'
# The voice assistant is currently processing the command
voice_assist_thinking_phase_id: '4'
@thanoskoutr
thanoskoutr / squashfs-install.md
Last active March 4, 2025 02:29
Fix sasquatch installation for binwalk

Fix sasquatch installation for binwalk

For anynone that is running the latest version of binwalk (Binwalk v2.3.3) and when trying to extract squshfs filesystems, gets the following error:

WARNING: Extractor.execute failed to run external extractor 'sasquatch -p 1 -le -d 'squashfs-root' '%e'': [Errno 2] No such file or directory: 'sasquatch', 'sasquatch -p 1 -le -d 'squashfs-root' '%e'' might not be installed correctly

it might have to do that the sasquatch project is missing or not working correctly.

Install sasquatch

@odan
odan / nginx-php-windows-setup.md
Last active March 4, 2025 02:22
Nginx and PHP Setup on Windows

Nginx and PHP Setup on Windows

For local development you could also use Nginx with PHP as an replacement for XAMPP.

Install Nginx

@egomez99
egomez99 / app.js
Created June 28, 2012 18:18
Android background service
/*global Ti, alert */
var SECS = 5;
var URL = 'testservice.js';
var win = Ti.UI.createWindow({
fullscreen: false,
navBarHidden: true,
exitOnClose: true
});

Code Bash command prefix detection

This defines risk levels for actions that the ${K4} agent may take. This classification system is part of a broader safety framework and is used to determine when additional user confirmation or oversight may be needed.

Command prefix extraction examples

Examples:

  • cat foo.txt => cat
  • cd src => cd

Since version 2.23, git-blame has a feature to ignore certain commits. This feature is useful to ignore large formatting or apparently unimportant changes.

How to use

  1. Create a revisions list file. The file name is usually .git-blame-ignore-revs
  2. Set the file as a default ignore file for blame by git config blame.ignoreRevsFile .git-blame-ignore-revs

The file format is described in git-fsck's man: https://git-scm.com/docs/git-fsck#Documentation/git-fsck.txt-fsckskipList