Skip to content

Instantly share code, notes, and snippets.

View eef's full-sized avatar
💭
I may be slow to respond.

Arthur Canal eef

💭
I may be slow to respond.
  • DoStuffMedia
  • Austin, Texas
View GitHub Profile
[
{
title: "Don Toliver - Thee Love Sick Tour 2023 with Pierre Bourne",
begin_time: "2023-08-11T19:00:00-05:00",
venue_title: "Moody Amphitheater at Waterloo Park",
status: "active",
entries: 10,
units: 50
}
]
@eef
eef / postgresql-set-id-seq.sql
Created October 11, 2021 21:54 — forked from henriquemenezes/postgresql-set-id-seq.sql
PostgreSQL set Next ID Sequence Value to MAX(id) from Table
-- Get Max ID from table
SELECT MAX(id) FROM table;
-- Get Next ID from table
SELECT nextval('table_id_seq');
-- Set Next ID Value to MAX ID
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));
@eef
eef / wakatime_block.go
Last active April 2, 2018 20:03
GoLang script to pull your daily duration coding. You must have your wakatime api key in $HOME/.wakatime.cfg. This will be present if you are using wakatime anywhere else.
package main
import (
"bufio"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
var request = $.ajax({
type: 'POST',
url: url,
data: data,
dataType: "html"
})
request.success(function(data) {
// yu promised mofo
});
module SoftDelete
def destroy
unless self.respond_to? :deleted_at
raise MissingMigrationException
end
self.update_attribute :deleted_at, Time.now
run_callbacks :destroy if self.is_a?(Performer)
function Chat() {
this.notifier = new Notifier();
this.tab_status = new TabStatus();
this.join();
this.open();
this.leave();
};
Chat.prototype.update = function(data, chat) {
if(data.hasOwnProperty("server")) {
package com.wellbaked.powerpanel;
// Android SDK Imports
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
// Java SDK Imports
import java.util.HashMap;