Skip to content

Instantly share code, notes, and snippets.

@truncs
truncs / Install i3 on arch.sh
Created January 26, 2023 06:37 — forked from chreniuc/Install i3 on arch.sh
Steps i followed to install arch + i3
timedatectl set-ntp true
timedatectl set-timezone Europe/Bucharest
fdisk /dev/sda
########################################
n 1G pentru /boot /dev/sda1
a - Flag it as bootable
n - 4G pentru swap /dev/sda3
n - 70G pentru / /dev/sda2
@truncs
truncs / casadi.py
Created September 28, 2022 06:01
Casadi Jacobian
class Fun(Callback):
# sin(x+3*y)
def __init__(self):
Callback.__init__(self)
self.construct("Fun", {})
def get_n_in(self): return 2
def get_n_out(self): return 1
def eval(self,arg):
Host Target
User aditya
IdentityFile ~/.ssh/id_rsa
ForwardAgent yes
ProxyCommand ssh -q -A aditya@<proxy_ip> socat STDIO TCP6:<dest_ip>
1426519380 293.98 294.18 293.96 294.16 12.45349 3661.3031246 293.99815832
1426519440 294.15 294.26 294.15 294.23 7.41 2179.9734101 294.19344265
1426519500 294.2 294.26 294.2 294.24 6.41173322 1886.5220145 294.22964895
1426519560 294.23 294.26 294.23 294.26 4.1776685 1229.2429009 294.24136954
1426519620 294.26 294.26 294.21 294.26 9.27 2727.6692827 294.24695606
1426519680 294.22 294.22 293.89 293.97 17.51 5149.6599228 294.09822517
1426519740 293.97 293.97 293.46 293.94 4.58 1345.6400081 293.80786202
1426519800 293.93 293.98 293.66 293.79 7.25298308 2130.4837121 293.73896072
1426519860 293.79 293.86 293.12 293.6 13.265 3896.6166218 293.75172422
1426519920 293.54 293.61 293.52 293.54 6.91 2028.398001 293.54529682
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDMmSXqYAVUAAskK1Tu5cVoMTtPyywf3xNXf8fLgm98Q aditya@Adityas-MacBook-Pro.local
package main
import (
"fmt"
"time"
)
func main() {
iterations := 10
myChannel := make(chan int)
@truncs
truncs / gist:4074634
Created November 14, 2012 20:39
Single and Double click together
var clicks = 0;
$('li').live({
click: function() {
node = $(this);
clicks++;
if (clicks == 1) {
setTimeout(function() {
if(clicks == 1) {
console.log('single click!');
} else {
@truncs
truncs / gist:4071195
Created November 14, 2012 09:30
backup 5
<!DOCTYPE html>
<html>
<head>
<title>I have a back bone</title>
</head>
<body>
Name: <input type="text" name="name" id="name"/>
Age: <input type="text" name="address" id="address"/>
<button class="post">Create</button>
@truncs
truncs / gist:4070555
Created November 14, 2012 05:55
backup 3
<!DOCTYPE html>
<html>
<head>
<title>I have a back bone</title>
</head>
<body>
<form>
Name: <input type="text" name="name" id="name"/>
Age: <input type="text" name="address" id="address"/>
<input type="submit" value="Submit"></input>
@truncs
truncs / gist:4065285
Created November 13, 2012 11:18
try 2
<!DOCTYPE html>
<html>
<head>
<title>I have a back bone</title>
</head>
<body>
<div id="contact-app">
<div class="title">
<h1>Contacts App</h1>