Skip to content

Instantly share code, notes, and snippets.

View ForumPlayer's full-sized avatar
💥
Segmentation fault (Core dumped)

Igor M. ForumPlayer

💥
Segmentation fault (Core dumped)
View GitHub Profile
@mixonic
mixonic / server.js
Created April 28, 2011 22:49
Node.js + Socket.io + Bash. A collaborative terminal for your browser.
//
// This server will start a bash shell and expose it
// over socket.io to a browser. See ./term.html for the
// client side.
//
// You should probably:
//
// npm install socket.io
// curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js
//
@ozh
ozh / new empty git branch.md
Last active May 29, 2024 00:00
Create a new empty branch in Git
$ git checkout --orphan NEWBRANCH
$ git rm -rf .

--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.

You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.

@jshaw
jshaw / byobuCommands
Last active July 4, 2024 10:58
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@lrq3000
lrq3000 / plwatch.sh
Created May 2, 2013 13:05
A simple bash script to watch packets loss using ping on Unix/Linux
#!/bin/bash
# Packets Loss Watch
# Simple SHELL script for Linux and UNIX system monitoring with
# ping command
#
# Copyright (c) 2006 nixCraft project <http://www.cyberciti.biz/fb/>
# Copyleft 2013 Stephen Larroque
# This script is licensed under GNU GPL version 2.0 or above
#
# This script was inspired by a nixCraft script http://www.cyberciti.biz/tips/simple-linux-and-unix-system-monitoring-with-ping-command-and-scripts.html
@iandundas
iandundas / new_gist_file
Created May 20, 2013 04:39
PHP: Relay POST and GET requests to a new URL, and output the result
<?php
// was used when API address moved but apps were live on app store.
$ch = curl_init();
$path = $_SERVER['REQUEST_URI'];
$path = str_replace('/api/index.php','',$path);
$path = str_replace('/api/','/',$path);
@seanbuscay
seanbuscay / git_create_orphan.sh
Created June 27, 2013 15:26
Create an orphan branch in a repo.
cd repository
git checkout --orphan orphan_name
git rm -rf .
rm '.gitignore'
echo "#Title of Readme" > README.md
git add README.md
git commit -a -m "Initial Commit"
git push origin orphan_name
@awidegreen
awidegreen / pulseaudio.service
Last active January 20, 2024 15:10
systemd definition for pulseaudio in system-mode (example for archlinux). The pulseaudio developers explicitly recommend to NOT run pulseaudo system-mode!
# systemd service spec for pulseaudio running in system mode -- not recommended though!
# on arch, put it under /etc/systemd/system/pulseaudio.service
# start with: systemctl start pulseaudio.service
# enable on boot: systemctl enable pulseaudio.service
[Unit]
Description=Pulseaudio sound server
After=avahi-daemon.service network.target
[Service]
ExecStart=/usr/bin/pulseaudio --system --disallow-exit --disallow-module-loading
<?php
/**
* Basic Trello API wrapper. Supports GET, POST, PUT and DELETE HTTP methods.
* All GET, POST, PUT and DELETE path's and params are here: https://trello.com/docs/api/index.html.
*
* @author André Dal Molin <admolindasilva@gmail.com>
* @version 1.0
* @since 2014-03-20
*/
class TrelloApi {
@phanan
phanan / runner.js
Last active May 8, 2024 08:44
Record a webpage with PhantomJS and FFMpeg
// Run this from the commandline:
// phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4
var page = require('webpage').create(),
address = 'http://s.codepen.io/phanan/fullembedgrid/YPLewm?type=embed&safe=true&_t=1424767252279',
duration = 3, // duration of the video, in seconds
framerate = 24, // number of frames per second. 24 is a good value.
counter = 0,
width = 500,
height = 500;
@alexlangberg
alexlangberg / dunstrc
Created May 27, 2015 22:19
Settings for dunst notifications. Colors from FlatStudio GTK theme (dark). Place in ~/.config/dunst/
[global]
font = Ubuntu 10
# Allow a small subset of html markup in notifications and formats:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see