Skip to content

Instantly share code, notes, and snippets.

View gsora's full-sized avatar
🤙
Vibin'

Gianguido Sorà gsora

🤙
Vibin'
View GitHub Profile
#!/bin/bash
# by @PeppeLaKappa
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
/sbin/iptables -A FORWARD -i wlan0 -o rndis0 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i rndis0 -o wlan0 -j ACCEPT
zstyle :compinstall filename '~/.zshrc'
autoload -Uz compinit zcalc
compinit
zstyle ':completion:*' menu select
zstyle '*:processes-names' command 'ps -e -o comm='
zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b'
zstyle ':completion:*' file-sort modification reverse
autoload -U colors && colors
zstyle ':completion:*' list-colors "=(#b) #([0-9]#)*=31=36"
#source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
sh /home/user/auguri.sh | mutt -s "AUGURI!!1 " EMAILDIBUSO
function percentageOrNot(onCoverBool) {
if(onCoverBool.valueOf() == true) {
coverPercentageOrNot.text = hunger.bat_cur_pr()
} else {
coverPercentageOrNot.text = hunger.long_text()
}
}
Timer {
//blabla
@gsora
gsora / GPUMorePowa.service
Created April 18, 2014 14:46
Boost Jolla UI smoothness
[Unit]
Description=Set the GPU power to the maximum!
After=connman.service
[Service]
Type=forking
ExecStart=/usr/bin/doGPUPowa
Restart=always
[Install]
@gsora
gsora / beat.c
Created April 18, 2014 22:05
4/4 with arbitrary BPM "metronome" in C
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define MINUTE_MS 60000
void tick(useconds_t);
int main(int argc, char *argv[]){
@gsora
gsora / getsIsUnsafe.c
Created June 20, 2014 18:21
This is why gets() is unsafe
#include <stdio.h>
#define BUF 5
int main(void) {
int a = 2;
char word[BUF];
printf("Declaread an integer a = 2, and a string.\nThis is where the gets kicks in.\nThe string where gets() will write is big 5, try to write someting > 5 and see what appends!\ngets: ");
gets(word);
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront

Keybase proof

I hereby claim:

  • I am peppelakappa on github.
  • I am gsora (https://keybase.io/gsora) on keybase.
  • I have a public key whose fingerprint is B66C 1724 76BA 7724 365C 0C0A A5BD 4FD9 415A C94B

To claim this, I am signing this object:

entry = {
cell = PSLinkCell;
icon = "/Applications/Preferences.app/Settings.png";
isController = 1;
label = "NoScreenshotty";
ALSettingsPath = "/var/mobile/Library/Preferences/me.urandom.noscreenshotty.plist";
ALSettingsKeyPrefix = "NoScreenshotty-";
ALSectionDescriptors = (
{
title = "System Applications";