Skip to content

Instantly share code, notes, and snippets.

View timtheguy's full-sized avatar
Probably drinking coffee

Tim Christovich timtheguy

Probably drinking coffee
View GitHub Profile
@gpocentek
gpocentek / gl-form.py
Created December 12, 2017 11:44
python-gitlab login/password auth using cookies
import re
import sys
import requests
import gitlab
URL = 'https://gitlab.com'
SIGN_IN_URL = 'https://gitlab.com/users/sign_in'
@vitalyisaev2
vitalyisaev2 / personal_access_token.py
Last active April 26, 2024 05:02
Script for obtaining Gitlab API Personal Access Token
#!/usr/bin/python3
"""
Script that creates Personal Access Token for Gitlab API;
Tested with:
- Gitlab Community Edition 10.1.4
- Gitlab Enterprise Edition 12.6.2
- Gitlab Enterprise Edition 13.4.4
"""
import sys
import requests
@jessicacarneiro
jessicacarneiro / ecies.ino
Created November 23, 2017 13:49
Example of use of RELIC's ECIES in an Arduino
#include <string.h>
extern "C" {
#include "../include/relic.h"
}
int relic_setup(){
if (core_init() != STS_OK) {
core_clean();
return 1;
@jessicacarneiro
jessicacarneiro / Makefile
Last active March 3, 2020 15:43
Makefile to upload RELIC and WiFi libraries to an Arduino Due
#!/usr/bin/make
# makefile for the arduino due.
#
# USAGE: put this file in the same dir as your .ino file is.
# configure the PORT variable and ADIR at the top of the file
# to match your local configuration.
# Type make upload to compile and upload.
# Type make monitor to watch the serial port with gnu screen.
#
# TODO: dependency checks for the local files.
00000 EF65 goto p_1ACA
00002 F00D ;nil
00004 FFFF ;nil
00006 FFFF ;nil
00008 6E04 movwf 4
0000A CFD8 movff STATUS,5
0000C F005 ;nil
0000E CFE0 movff BSR,6
00010 F006 ;nil
00012 0100 movlb 0
@vingkan
vingkan / hawklinkrosterscraper.js
Created September 14, 2017 19:58
Improved Roster Scraper for Campus Labs
var orgID = // Your Organization ID;
getOrganization(orgID, 1).then((initialOrg) => {
getOrganization(orgID, initialOrg.totalItems).then((fullOrg) => {
let promises = [];
fullOrg.items.forEach((item) => {
let memberID = item.account.id;
let p = getMember(memberID);
promises.push(p);
});
Promise.all(promises.map(reflectPromise)).then((res) => {
@Happsson
Happsson / ArduinoKeyboardEmulator.pde
Last active February 6, 2018 13:47
Processing sketch that lets you use any Arduino as a keyboard emulator.
/*
Auth. Hannes Paulsson
Used to simulate keypresses on any Arduino board.
In arduino sketch, start serial at baudrate 9600 (or edit variable in this sketch)
Only 0-9 and a-z (not case sensitive). Enter can be sent by writing \n.
If you need other keys,
add check for those in serialEvent()-function. Look at: https://docs.oracle.com/javase/7/docs/api/constant-values.html
under java.awt.KeyEvent to see the values for all possible keys.
@leifwells
leifwells / google-drive.ts
Last active December 29, 2018 05:35
Example Ionic 2/Angular 2 Provider for a Google spread sheet
import {Injectable} from '@angular/core';
import {Http} from '@angular/http';
import 'rxjs/add/operator/map';
/*
Generated class for the GoogleDrive provider.
See https://angular.io/docs/ts/latest/guide/dependency-injection.html
for more info on providers and Angular 2 DI.
*/
@jakebathman
jakebathman / botPost.php
Last active July 12, 2020 00:10
GroupMe bot post function including @mentions
<?php
/**
* Post a message from a bot to a group
*
* $groupId (string) GroupId of the group to post the message
* $strMessage (string) Text of the message to post (limit of 1000 characters)
* $strBotId (string) ID of the bot which will post the message
* $mentionUsers (array) [optional] array of userIds to mention (uses attachment)
* Example array of userIds:
@tsaqib
tsaqib / ideas.md
Last active April 14, 2024 12:48
Ideas that you can use for hackathons, competitions and research.

Ideas

I have collected and moderated these ideas from various public sources and put into one place so that problem solvers and solution developers may find inspirations. Because I wish to update it regularly, I have setup as a single page wiki. You may try these ideas on hackathons/competitions/research; some are quite intense problems and some are not. Many of the problems were prepared keeping Dhaka/Bangladesh in mind, but of course can be applied to just about any underdeveloped/developing and sometimes developed countries.

Categories:
  • Eradicate Extreme Poverty and Hunger
  • Education
  • Healthcare
  • Governance